thor-os 0,0,0,0

Simple operating system in C++, written from scratch

Thor Operating System

.. image::

Thor is an operating system created for learning purposes and for fun.

It is currently a 64bit OS written mainly in C++, with few lines of assembly when necessary.

Features ########

  • 64bit operating system (x86_64 architecture only)
  • Preemptive Multiprocessing
  • Applications written directly in C++ with a system library (loaded with ELF)
  • Keyboard / Mouse driver
  • Full ACPI support with ACPICA
  • Read/Write ATA driver
  • FAT32 file system support
  • HPET/RTC/PIT drivers
  • Basic networking support (WIP) with Realtek 8139 driver
  • Basic PCI support
  • Multi stage booting with FAT32

Why?… #######

There are many reasons to build an operating system from scratch.

For me, the main two reasons are for fun and to learn new things. When I grew bored of working on my custom compiler, I decided to work on a new project and I chose Operating System Development. It’s probably the most complicated hobby project that can be done. I had to learn plenty of things to be advance during this project. There are tons of difficulty that you don’t even think about in normal programs. More generally, since I love programing, I was sure I could have a lot of fun developping my own OS. There is also the geek side of having its own OS :)

I have absolutely no intentions on making money with this project. When I won’t have fun anymore developing it, I’ll simply switch project for a while ;)

… and How? ############

Writing an operating system from scratch is not easy and at each step you need a lot of information that is not necessarily easily available. Generally, the more advanced your OS is, the less information you’ll find.

The main two resources for develpment have been:

  • The Wiki <>_ : There are tons of information of various subjects.
  • The Forum <>_ : Tons of great post and a lot of very skilled people to help you if you have a specific issue.

A good series of tutorials to start with is the Broken Thorn series <>_. I haven’t followed the complete tutorial (only some specific parts), but it’s full of good information and it’s probably a good place to start with.

There are also the James Molloy Series <>_. It’s much less complete, but if you like tutorial, it’s probably going to be helpful.

And of course (if you develop on Intel), the Intel 64 and IA-32 Architectures Software Developer’s Manual, there are several parts to the guide, I’ve mainly used the System Programming - Part 1 part. Although it can seem heavy, it’s pretty good and will reveal invaluable asset to understand the architecture. For instance, paging and interrupts handling.

As for Books, I’ve been pretty much disappointed so far. There are plenty of books on operating system, but none of the few I’ve read so far have been great. They are probably good at helping you understand OSes, but pretty bad at helping you develop your own OS. Moreover, they are also pretty much outdated.

The books I’ve read are:

  • Modern Operating Systems by Andrew S. Tanenbaum, 3rd ed. It’s a pretty good book overall. It covers most of the subjects, although it doesn’t go in too much details on some subjects (network implementation). Moreover, it also covers some subjects that most hobbyist are not going to care about (lots about security for instance).
  • Operating Systems: Design and Implementation by Andrew S. Tanenbaum et al. I would only advice this book if you want to learn about MINIX, if you don’t care about MINIX, don’t read this book. It’s full of code, not really well organized and not easy to follow.

In general, while books will help you understand operating systems a bit, they won’t really help you develop anything. I’ve other books that should arrive soon, I hope they’ll turn out better.

Build #####

Build procedure is described on the Wiki:

License #######

This project is distributed under the MIT License. Read LICENSE for details.

Related Repositories



Simple operating system in C++, written from scratch ...

Top Contributors

wichtounet bryongloden