Xv6, a simple Unix-like teaching operating system
a minimal Unix-like kernel for RISC-V

Links
About
From the README,
xv6 is a re-implementation of Dennis Ritchie’s and Ken Thompson’s Unix Version 6 (v6). xv6 loosely follows the structure and style of v6, but is implemented for a modern RISC-V multiprocessor using ANSI C.
This is an undergraduate course at MIT that has students implement a minimal Unix-like kernel with the following assignments (ref the course schedule)
- util: Unix utilities
- syscall: System calls
- pgtbl: Page tables
- traps: Traps
- cow: Copy-on-write fork
- thread: Multithreading
- net: Network driver
- lock: Parallelism/locking
- fs: File system
- mmap: Mmap
Personal Notes
This was a meaningful continuation of the eXpOS project that I implemented in college. That had a lot of the core concepts as the above, but the implementation was for a simulated multi-processor architecture (XSM) that abstracts a lot of the complexities of real-world machines. It was fun to work on something that could genuinely run on a real-world machine. Over the course of implementing this, I had to refer the official RISC-V ISA manual to understand some implementation details, which was also pretty cool.
I paused my implementation somewhere in the middle of Assignment 7 above, mostly because some personal stuff came up and I got lost reading the E1000 Software Developer’s Manual. This is definitely something I plan to pick up and finish again, possibly once I get my hands on the Framework RISC-V Mainboard and can boot into my own OS!