The Learnix Operating System
"If you can't explain it simply, you don't understand it well enough." - Albert Einstein
Hello there!1
In this book we are going to write and learn about operating systems together!
We are going to implement an entire POSIX compliant OS in Rust and not use ANY2 external libraries. All of the thought process, code and implementations will be explained and documented here as well as in this repo which all the code snippets are from.
Note: ALL the syntax highlighting of the Rust code is custom and create by me! If you see and bug, please write in the comments or submit an issue.
Base Knowledge
This book will be technical, and will assume a little bit of a programming knowledge background, but not necessarily in rust
If you are not coming from a low level programming knowledge that's fine!
Just make sure you know this stuff or learn it as you read. Also if in any place on this book I take some things for granted, please, open an issue here and let me know so I could explain it better.
Some of the base knowledge that you would need to have:
-
Some assembly knowledge. (just understand simple movs, and arithmetic operations, at a very basic level3)
-
Some knowledge on memory. (what's a pointer, what's an address)
-
A knowledge in rust is not that important, but knowing at least one programming language is. I myself have some more learning in Rust, and in this book I will also explain some great features that it has!
-
A lot of motivation to learn and understand because it is a complex subject.
Roadmap of this book
-
Compiling a stand alone binary
-
Boot loading, Debugging, stages and some legacy stuff
-
Important cpu modes and instructions
-
Paging, writing out own malloc
-
Utilizing the Interrupt Descriptor Table
-
File systems and Disk Drivers
-
Thinking in terms of processes
-
Writing a shell
-
Running our first program! (Which off course will be Doom)
-
To be continued (Hopefully virtualization section and loading a vm of other OS)