Hey there! In this book, we’re going to build a small operating system from scratch, step by step.
You might get intimidated when you hear OS or kernel development, the basic functions of an OS (especially the kernel) are surprisingly simple. Even Linux, which is often cited as a huge open-source software, was only 8,413 lines in version 0.01. Today’s Linux kernel is overwhelmingly large, but it started with a tiny codebase, just like your hobby project.
We’ll implement basic context switching, paging, user mode, a command-line shell, a disk device driver, and file read/write operations in C. Sounds like a lot, however, it’s only 1,000 lines of code!
↫ Seiya Nuta
It’s exactly what it says on the tin.
And the entire templeOS was 100k lines, but that included not just a kernel and user space, it also had a GUI, some drivers, a few games and lots of neat stuff.
I was going to provide SerenityOS as an example of a small OS but apparently they have over a million lines on GitHub now! Granted that is not only a full OS with GUI but also C, C++, and crypto libraries along with a browser, image editors, basic office apps, and more. Not sure how much the OS itself is. Probably a lot more than TempleOS.