Xv6, a simple Unix-like teaching operating system

November 10, 2011 | Operating Systems | By: Mark VandeWettering

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.

Share Button
Be Sociable, Share!

Comments

Comment from kiwimonster
Time 11/11/2011 at 12:02 pm

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.

Write a comment






2 + = three