• Stars
    star
    1,637
  • Rank 28,564 (Top 0.6 %)
  • Language
    C++
  • License
    MIT License
  • Created about 11 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple operating system in C++, written from scratch

Thor Operating System

https://github.com/wichtounet/thor-os/wiki/images/thor-vesa.png

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

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

Features

  • 64-bit 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 no longer have fun 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:

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.

There are also the James Molloy Series. It's much less complete, but if you like tutorials, 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 be an 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 hobbyists 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 advise 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

Note: This repository, is using submodules, don't forget the --recursive option when you check it out.

Build procedure is described on the Wiki: https://github.com/wichtounet/thor-os/wiki/Build

License

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

More Repositories

1

dll

Fast Deep Learning Library (DLL) for C++ (ANNs, CNNs, RBMs, DBNs...)
C++
670
star
2

etl

Blazing-fast Expression Templates Library (ETL) with GPU support, in C++
C++
216
star
3

articles

Source code for my articles
C++
145
star
4

budgetwarrior

Personal finance manager, command-line interface, in C++
C++
111
star
5

mnist

Simple C++ reader for MNIST dataset
C++
82
star
6

btrees

C++ implementation of concurrent Binary Search Trees
C++
72
star
7

swr-calculator

Safe Withdrawal Rate (SWR) Calculator
C++
52
star
8

sudoku_dataset

Dataset of Sudoku images for Machine Learning
C++
41
star
9

cpm

Continuous Perfomance Monitor (CPM) for C++ code
C++
40
star
10

cpp_utils

Collection of header-only utilities for C++
C++
35
star
11

eddic

Compiler of the EDDI programming language
C++
33
star
12

systemd-unit-files

Some unit files for systemd
32
star
13

frameworks

Lua
19
star
14

CMakeLatex

Simple CMake configuration for Latex
Awk
18
star
15

cifar-10

Simple C++ reader for CIFAR-10 dataset
C++
18
star
16

zabbix-lld

Script and template export for Zabbix LLD
Shell
16
star
17

dotfiles

My dot files
Lua
14
star
18

java-benchmarks

Performance benchmarks on the Java Platform
9
star
19

etl-gpu-blas

Mini BLAS-like library for GPU (complementary to CUBLAS)
C++
7
star
20

pm

Simple project manager in Python
Python
5
star
21

sudoku_recognizer

Program to detect and recognize Sudoku in images
C++
5
star
22

make-utils

Simple utility to easily write makefile for C++ projects
Makefile
5
star
23

eddivm

Eddi Virtual Machine
C++
4
star
24

word_spotting

C++
4
star
25

HazardManager

Utility class to use Hazard Pointers in C++ Concurrency Code
C++
4
star
26

gooda-to-afdo-converter

Converter from Gooda Spreadsheets to AFDO
C++
4
star
27

GraphMyData

Java
3
star
28

taskwarrior-php

A very simple PHP Front End Viewer for Task Warrior
PHP
3
star
29

jtheque-core

Framework to create modular applications in Java
Java
3
star
30

mafiaspacelife

Java
3
star
31

benchmark-utils

A little benchmark utility to bench Java Code and generate Graphs
Java
3
star
32

cpp_utils_test

Unit tests for cpp_utils
C++
3
star
33

inlining-analyzer

Analyze a callgraph to find the most interesting functions to inline in a C++ applications
C++
3
star
34

cppbench

Benchmark framework for C++ function
C++
2
star
35

analysis-examples

C++
2
star
36

spirit_x3_tests

C++
2
star
37

asgard-server

C++
2
star
38

tetris-ai

Tetris Clone for AI experiments
Java
2
star
39

ICM

International Contract Management
JavaScript
2
star
40

gcc-loop-fusion

GCC Loop Fusion
C++
2
star
41

aggregator-plugin

Sonar plugin to display metrics aggregated over all projects
HTML
2
star
42

dotfiles-vim

Dotfiles for vim
Vim Script
1
star
43

dll-autoencoders

C++
1
star
44

jtheque-films-module

A module of JTheque to manage a collection of films
Java
1
star
45

latex-makefile

A simple makefile for Latex
1
star
46

svm_mnist

C++
1
star
47

jtheque-books-module

A module of JTheque to manage a collection of books
Java
1
star
48

jtheque-tools-module

A module of JTheque providing several tools for other modules
Java
1
star
49

dbn_experiments

Experiments with DBN and RBM
C++
1
star
50

nice_svm

Wrapper around libsvm to make it easier to use and make the code nicer
C++
1
star
51

eddi-commons

Eddi Commons
C++
1
star
52

etl_vs_blaze

C++
1
star
53

VaadinBoard

Java
1
star
54

jtheque-demo-module-2

jtheque-demo-module-2
Java
1
star
55

dotfiles-pentadactyl

Dotfiles for pentadactyl
JavaScript
1
star
56

asgard-lib

Library for asgard system
C++
1
star
57

dotfiles-git

Dotfiles for git
1
star
58

pkg-config

Some of my pkg-config files
1
star
59

jtheque-xml-utils

Utility to write and read XML files
Java
1
star
60

jtheque-primary-utils

An utility module for JTheque
Java
1
star
61

jtheque-utils

Java Library providing general utilities (File, String, Swing, ...)
Java
1
star
62

jtheque-movies-module

A JTheque module to manage a collection of movies
Java
1
star
63

jtheque-unit-utils

A simple utility library to write unit test for file operations and for databases operations
Java
1
star
64

thesis-perfs

C++
1
star
65

jtheque-metrics-module

A module of JTheque to generate metrics about a Java project
Java
1
star
66

MarathonMillions

Le marathon des millions
C#
1
star
67

shell-tools

Reminder for common shell commands
1
star
68

jtheque-stats-module

A module of JTheque to display stats about films
Java
1
star
69

jtheque-demo-module-1

jtheque-demo-module-1
Java
1
star
70

jtheque-films-to-buy-module

A module of JTheque to manage a list of films to buy
Java
1
star
71

test-cppsqlite3

C++
1
star
72

dotfiles-zsh

Dotfiles for zsh
Shell
1
star
73

asgard-system-driver

C++
1
star
74

wichtounet.github.io

The sources of my blog (Generated with Nikola)
HTML
1
star
75

budgetwarrior_web

C++
1
star
76

jtheque-osgi-wrap

Maven wrapper to create OSGI bundle of non-bundle libraries
1
star
77

jtheque-web-search-module

A module of JTheque to search informations about films on internet
Java
1
star
78

jtheque-memory-module

A JTheque module to display the used memory
Java
1
star