Skip to content

Comment on Xv6, a simple Unix-like teaching operating systemparent

Comments

I've taught OS three times using xv6 and like it a lot.

It's very small, which is great. You can print out the entire source code (and there's a makefile target that will produce a printable PDF) and read through it and actually understand the whole system.

At the same time, it has most of the features of an OS that you might want to cover in an intro course:

1. A basic round robin scheduler that you can replace with something more interesting like priorities.

2. A simple FS that still has some advanced features like transactions / crash recovery.

3. Support for SMP, so you can teach issues like locking / deadlocks.

4. UNIX-like system call API, that's again easy to extend to show how a new system call might be implemented.

Off the top of my head, some things it lacks compared to something like Linux:

1. Driver support. Basically only the vga and old-school IDE disks are supported. I've assigned a mouse driver as a final project before and it went pretty well: https://panda.moyix.net/~moyix/cs3224/fall16/bonus_hw/bonus_...

2. Related to (1), this means you aren't going to get anything related to networking.

3. No dynamic linking; every program is static.

4. Anything graphical (although I've seen people do this as a final project)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.