Settings

Theme

Thinking about building a operating system

1 points by pratikshit08 2 years ago · 2 comments


linguae 2 years ago

Some good resources to start with:

- OSDev.org (https://wiki.osdev.org/Expanded_Main_Page) is a great starting point for writing an operating system

- Three Easy Pieces (https://pages.cs.wisc.edu/~remzi/OSTEP/) is a wonderful free online textbook that teaches the concepts of operating systems.

- Modern Operating Systems, 5th Edition by Andrew Tanenbaum (of MINIX fame) and Herbert Bos (https://www.pearson.com/en-us/subject-catalog/p/modern-opera...) is the latest edition of a solid graduate-level textbook on operating system concepts.

It may also be beneficial studying the source code of existing operating systems. I recommend starting with smaller, simpler systems, such as MINIX and xv6 (https://github.com/mit-pdos/xv6-public), before moving on to larger, more complex systems such as the Linux kernel (https://kernel.org/) and its userland (e.g., GNU utilities, systemd, etc.).

Another cool thing is to study the designs of non-Unix operating systems, such as the classic Mac OS, VMS, IBM OS/400, Plan 9 (yes, this is "more Unix than Unix" in many ways, but it's quite a departure from Unix) and its successor Inferno, and Symbolics Genera. Bonus points for reading academic papers on OS concepts such as exokernels.

Good luck! It's a long but very interesting journey!

FrankWilhoit 2 years ago

Extremely difficult task. Think of a kernel as a container of device drivers, where the motherboard/system is the top level device (scheduling, including interrupts), each processor is a device, memory is a device, etc. The most important decisions to make up front have to do with managing state across transitions between kernel mode and user mode. Say what you will of Windows, its model for this is potentially highly performant, though Microsoft's documentation is so poor that most drivers are badly written: too much is done in ISRs versus DPCs. (In the early days, Microsoft sold very expensive training under NDA; I'm not sure they are still doing that but it is why, to this day, the doco still leaves out so much essential context.)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection