Hacker News new | ask | show | jobs
by _russross 2097 days ago
I teach using xv6 and would add a couple more items to what others have already pointed out. They mainly come down to simplifications that remove distractions from the core ideas:

* The system assumes a fixed amount of RAM and a fixed memory layout, so there is no discovery process and no adaptive code to go with it

* The process table is just a small array--no dynamic allocation necessary, and the system can just do a linear search to find an unused entry

* The userspace is simplified. There is a single stack (no threads) of fixed size, mapped memory starts at address 0, and memory is layed out so that only a single number is required to track the size of the entire address space: the size is the top of mapped memory.

Simple data structures are used everywhere, and the emphasis is always on clarity, not efficiency or flexibility.