I would really like to understand how an operating system works behind the scenes. However, I think that the kernel of most open-source OSs out there are too complex for learning purposes, even for a full-time programmer to learn. Are there any "simple" OSs made for learning purposes only out there?
closed as primarily opinion-based by ChrisF♦ Oct 23 '13 at 8:01
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
Andrew Tanenbaum's Minix (see Operating Systems Design and Implementation) is intended for exactly this sort of purpose. Another (albeit quite dated) possibility is to read through Lion's Book, which covers Unix V6 (full Unix, but an old enough version that it's still simple enough for fairly easy study). The obvious disadvantages of the latter are that the C it uses is quite obsolete, so even fairly experienced C programmers may find parts somewhat difficult to read, and you can't plan on a modern compiler digesting the code.
You should consider a modern Unix-a-like, the Xv6 operating system, used in an OS course at MIT. It appears to have some course material associated with it, as well.
It runs in both Bochs and Qemu x86 emulators. I did that part. It was fun.
Minix is a great choice and is described in one of the other responses.
Also consider XINU - XINU Is Not Unix.
Is is also UNIX spelled backward.
There is a book by Douglas Comer that I thought was well written, well illustrated, and well scoped.
There is an Embedded Xinu and a website about teaching with Xinu.
Another smallish OS that gets a lot of love these days is FreeRTOS. It runs on almost everything. If you came from Mars and had a processor or eval board where it doesn't run, you could read about 10 pages of documentation, modify about five files related to interrupts, timers, and UARTs and you would be running.
They claim it supports 31 architectures and 18 tool chains. My experience in late 2009 was good, and I hear it has been improved a lot since then.
A similar questions on that might have helpful information for you is located here:
Linux and a lot of other operating system design is influenced by UNIX, so this video where the original designers (Kernigan, Richie, and Thompson and others) is both informative and gets the design ideas right from the source.
There is a classic but often revised operating systems text book:
Silberschatz, Galvin, Gagne: Operating System Concepts, 7th Edition
There may be newer editions too. I seldom link to a book through a book seller, but the preview is very generous, so to learn more about operating systems, please check out:
In my university we have learnt NachOS. It's a great open source OS for learning. You can also find many universities exercises on NachOS for learning.
Nachos is instructional software for teaching undergraduate, and potentially graduate, level operating systems courses. The Nachos distribution comes with:
- An overview paper
- Simple baseline code for a working operating system
- A simulator for a generic personal computer/workstation sample assignments
- A C++ primer (Nachos is written in an easy-to-learn subset of C++, and the primer helps teach C programmers our subset)
The assignments illustrate and explore all areas of modern operating systems, including threads and concurrency, multiprogramming, system calls, virtual memory, software-loaded TLB's, file systems, network protocols, remote procedure call, and distributed systems.
Take a look at KOS (Kid OD) and SOS (Simple OS). Both are Operating Systems designed to teach the internals of an OS. KOS is the "father" of SOS, and was built based on the experience gained from KOS.
These projects were the basis of many educational articles in Linux Magazine France.
On the KOS website, you can also find a page where you can download the sources of other simples OSs.
People can understand all of CP/M and early DOS versions. After that things got out of control and nobody knows everything anymore. They weren't designed for learning how an OS works but many people did learn that from those OS.
Go read a book about programming in assembler. You don't have to become profictient at it but it will teach you a lot of the inner workings of a computer.