Xv6, a simple Unix-like teaching operating system
Yes! I'm so happy to see this featured on HN. You'll be fascinated by the topics presented in xv6.<p>Have you ever:<p>- ... Wondered how a filesystem can survive a power outage?<p>- ... Wondered how to organize C code?<p>- ... Wondered how memory allocation works?<p>- ... Wondered how memory paging works?<p>- ... Wondered about the difference between a kernel function and a userspace function?<p>- ... Wondered how a shell works? (How it parses your commands, or how to write your own, etc)<p>- ... Wondered how a mutex can be implemented? Or how to have multiple threads executing safely?<p>- How multiple processes are scheduled by the OS? Priority, etc?<p>- How permissions are enforced by the OS? Security model? Why Unix won while Multics didn't (simplicity)?<p>- How piping works? Stdin/stdout and how to compose them together to build complicated systems without drowning in complexity?<p>- So much more!<p>I credit studying xv6 as being one of the most important decisions I've made; up there with learning vim or emacs, or touch typing. This is foundational knowledge which will serve you the rest of your life in a thousand ways, both subtle and overt. Spend a weekend or two dissecting xv6 and you'll love yourself for it later. (Be sure to study the book, not just the source code. It's freely available online. The source code is also distributed as a PDF, which seems strange till you start reading the book. Both PDFs are meant to be read simultaneously, rather than each alone.)