brainwagon "There is much pleasure in useless knowledge." — Bertrand Russell


Xv6, a simple Unix-like teaching operating system

I like operating systems. My first exposure to Unix was a revelation. Unix was a complex operating system that provided useful facilities for programmers, and it wasn't written in assembler and locked away: it was written in C (the same language that you use to write ordinary programs for Unix) and it was understandable.

This was enhanced by The Lions Commentary on Sixth Edition Unix. It's a brilliant commentary, clearly describing the source code for the Sixth Edition Unix. It filled a gap in the practical learning of operating systems for a generation of students.

But, well, it's aging. It's hard to use the Sixth Edition code, because it's written for a PDP-11, in an archaic dialect of C, and well... we can do better.

Luckily, that's what MIT thought too. They created an ANSI C version of the Sixth Edition Unix, compiled it for the x86 architecture in a way that could be run under the QEMU or BOCHS emulator. Here's the page:

Xv6, a simple Unix-like teaching operating system

It's less than 8K lines of C, under the MIT license. Seems like the kind of thing that could prove useful: bookmarked for future perusal.

Comments (1) Trackbacks (0)
  1. Now I feel old.

    Version 6 Unix was my first exposure to Unix and C as an Explorer Scout in high school sponsored by Tektronix. It didn’t last long, they upgraded it to PWB, Programmer’s Workbench, which is based on Version 7. I still have my printed set of man pages from Version 6.

    My main programming memory from that time is struggling to get scanf to do what I wanted it to do. Not for the last time… Oh, and using teco to edit C programs (they didn’t encourage that at all).

    Just checked on the status of one of our advisers at Tek – Clem Cole. Apparently he now works for Intel (as do I), and he is the president of the USENIX association. Small world.

Leave a comment

No trackbacks yet.