Welcome

Whether you’re reading this online, or in a book, welcome to our collection of notes about operating systems development! We’ve written these while writing (and re-writing) our own kernels, with the intent of guiding a reader through the various stages of building an operating system from scratch. We’ve tried to focus more on the concepts and theory behind the various components, with the code only provided to help solidify some concepts.

The main purpose of this book is to explore the whole process from a beginners point of view: we decided to keep things as simple as possible for this reason. Readers with more experience will notice that some design decisions and comments are not the optimal way to implement some things, or that some descriptions are over simplified - this is on purpose. The intent here is to provide a jumping-off point for the readers to continue on from.

We hope you enjoy, and find something interesting here!

Structure Of The Book

The book is divided in parts and every part is composed by one or more chapter. Each numbered chapter adds a new layer to the kernel, expanding its capabilities. While it’s not strictly necessary to read them in order, it is encouraged as some later chapters may reference earlier ones.

There is also a series of appendices at the end of the book, covering some extra topics that may be useful along the way. The appendices are intended to be used as a reference, and can be read at any time.

Topics covered

As we’ve already mentioned, our main purpose here is to guide the reader through the general process of building a kernel (and surrounding operating system). We’re using x86_64 as our reference architecture, but most of the concepts should transfer to other architectures, with the exception of the very early stages of booting.

Below the list of parts that compose the book:

In the appendices we cover various topic, from debugging tips, language specific information, troubleshooting, etc.

Assumed Knowledge

This book is written for beginners in operating system development, but some prior experience with programming is recommended. It is not intended to teach you C, or how to use a compiler or linker.

Code can have bugs and freestanding code can be hard (or impossible) to debug in some cases. Some hardware does not include serial ports, real CPUs can have bugs in hardware, or architectural quirks you’re unaware of that interfere with developing for them.

As such, below is a list of the recommended prior experience before continuing with this book:

If you feel confident in your knowledge of the above, please read on! If not, don’t be discouraged. There are plenty of resources available for learning, and you can always come back later.

About The Authors

Nerd and in free time programmer!! - I just love software development and everything is about computer, the lower level the better. My main job is software developer, as well as my main hobby (not the only one). I wanted to write my own kernel since I discovered programming. Even though it took years to understand how to do it. My first attempt in writing a kernel was DreamOS (32 bit kernel). My main programming language is C, although I used also Java, Python, Go, Assembly. - Ivan.

I’m a hobbyist programmer, and have been working on my operating system kernel since 2021, called northport. I’ve experimented with a few other projects in that time, namely a micro-kernel and a window manager. Before getting into osdev my programming interests were game engines and system utilities. My first programming project that I finished was a task manager clone in C#. These days C++ is my language of choice, I like the freedom the language offers, even if its the freedom to cause a triple fault. - Dean.

Our Projects