|Xv6: A Simple Unix-like Teaching Operating System|
|By Thom Holwerda, submitted by edwin on 2011-11-09 21:26:52|
|Way back in 2002, MIT decided it needed to start teaching a course in operating system engineering. As part of this course, students would write an exokernel on x86, using Sixth Edition Unix (V6) and John Lions' commentary as course material. This, however, posed problems.
The biggest problem is that while the course focuses on teaching writing an exokernel for the x86 architecture, Sixth Edition Unix and Lions' commentary focusses on the PDP-11 - a completely different kind of system. Students complained about these differences, but also the lack of relevance of learning how to code for the PDP-11. On top of that, Sixth Edition Unix is written in a dead dialect of C (pre-K&R C).
So, MIT took a drastic approach: they decided to rewrite Sixth Version Unix for x86 in ANSI C. Along the way, they improved it as well by adding SMP support. "Xv6's use of the x86 makes it more relevant to students' experience than V6 was and unifies the course around a single architecture," the project page details, "Adding multiprocessor support requires handling concurrency head on with locks and threads (instead of using special-case solutions for uniprocessors such as enabling/disabling interrupts) and helps relevance. Finally, writing a new system allowed us to write cleaner versions of the rougher parts of V6, like the scheduler and file system."
While this project was released in 2006, I had never heard of it (until yesterday), and I'm pretty sure many of you haven't either. John Lions' commentary and V6 are of course incredibly famous, but I'm not sure if the same applies to Xv6.
In any case, the code is out there for all to see and use (
- From the AT&T Archives: The UNIX Operating System - 2017-03-29
- The enviable pedigree of UNIX and POSIX - 2017-02-02
- How Unix made it to the top - 2016-12-18
- Unix in your browser tab - 2016-12-12
- More related articles