Skip to content

Yunyung/Operating-Systems-Design-and-Implementation-osc2021

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Operating Systems Design and Implementation

64-bit unix-like kernel for Raspberry Pi 3B+ (CPU: Arm Cortex A53)

NYCU, Operating System Capstone, Spring 2021

Author

Student ID GitHub Account Name Email
0856167 Yunyung 許振揚 [email protected]

About this Repository

  • This is the repository for the labs in NCTU CS Operating Systems Capstone(OSC, or OSDI) Spring 2021 class.
  • We are going to design some important part in the OS implementation.
  • The hardware we use is Raspberry Pi 3 Model B+.

How to Use This Repository

  • Lab instruction is in here.
  • You can download different labs in branch and release.
  • Here are some references we use in each lab.

Labs

  • Lab 0: Environment Setup
  • Lab 1: Hello World
  • Lab 2: Bootloader
  • Lab 3: Allocator
  • Lab 4: Exception and Interrupt
  • Lab 5: Thread and User Process
  • Lab 6: Virtual File System
  • Lab 7: File System Meets Hardware
  • Lab 8: Virtual Memory

Progress Overview

  • Lab0: Environment Setup
  • Lab1: Hello World
  • Lab2: Booting
  • Lab3: Allocator
  • Lab4: Exception and Interrupt Handling
  • Lab5: Multitasking
  • Lab6: Virtual Filesystem
  • Lab7: Filesystem Meets Hardware
  • Lab8: Virtual Memory

Kernel Features

  • Initialize rpi3 (Clear bss segment, set stack pointer...)
  • Set up mini UART
  • Kernel shell

Booting

  • UART bootloader
  • Loading cpio archive
  • Bootloader Self Relocation
  • Parsing Devicetree

Exception & Interrupt

  • Synchronous exception handling
  • Asynchronous interrupts (i.e. Hardware interrupt) handling. (Including core timer, mini uart I/O)
  • MiniUART I/O - supports sync/async I/O
  • Timer Multiplexing
  • Concurrent I/O Devices Handling

Multitasking

  • Create kernel/user thread
  • Context switch
  • Task Scheduler
  • System call. (fork / exec / wait / exit...)
  • User / Kernel threads
  • Wait queues
  • User preeption
  • Kernel preemption - protect critical sections
  • POSIX Signals - kill(), signal(), sigreturn()

Memory allocator

  • Buddy Memory Allocator
  • Slab Allocator
  • Startup Allocator

Vitual Memory

  • Kernel/User virtual address space
  • Page fault handler
  • mmap
  • Demand paging
  • ELF Loader
  • Copy on Write

Virtual File System

  • Virtual filesystem (VFS)
  • VFS APIs and interfaces - open / read / write / close / mount ...
  • VFS System calls
  • Multi-levels VFS
  • Memory-based file system, tmpfs. And mount the tmpfs as the root file system.
  • Component name cache mechanism for faster pathname lookup
  • Read a directory
  • System-wide opened file table, Per-process file descriptor tables
  • Populate the root file system with initramfs
  • Mount Another File System
  • /proc file system

File System & Interact with sdcard

  • Fat32 file system - read / write / open / close ...
  • Read/write data from an SD card hardware
  • Access hardware devices by the VFS
  • Mount the FAT32 File System
  • Parse MBR (Master Boot Record)
  • FAT32 with LFN (Long File Name) support
  • Device File
  • Memory as cache for external storage

About

⚡️ 64-bit unix-like OS kernel for Raspberry Pi 3B+

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published