Code Monkey home page Code Monkey logo

operating-systems-design-and-implementation-osc2021's Introduction

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

operating-systems-design-and-implementation-osc2021's People

Contributors

yunyung avatar t0037799 avatar

Stargazers

Stefan Liao avatar bananaben avatar TryMi avatar

Watchers

James Cloos avatar

operating-systems-design-and-implementation-osc2021's Issues

Bootloader jump error

In some situation, bootloader can't jump to actual kernel. (e.g. If shell command "ls" and "cat" are enable at the same time, it can't jump correctly)
Possible fault : Checksum are different in sender and receiver

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.