Build OS from scratch

Started by
13 comments, last by KulSeran 17 years, 7 months ago
If I were to aim at building a rediculously bare-bones OS in C++ could anyone point me at some resources I can use to look up how to approach this? I am interested in this project for academic purposes so please don't try to dissuade me, I know I won't make a better OS than existing ones, I just want to know -how- to do it.
_______________________"You're using a screwdriver to nail some glue to a ming vase. " -ToohrVyk
Advertisement
There's a FAQ here. Their forum is pretty good too.
Whoa, thanks, good response time too.
_______________________"You're using a screwdriver to nail some glue to a ming vase. " -ToohrVyk
Here's another reference source: Bona Fide OS Development Tutorials.

And this, ASM Community Messageboard - Index, might prove helpful too.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Hi,

The best pointer I can give you is sos.enix.org. Their website is in french or
english if you prefer. They wrote about 10 articles for the French Linux
Magazine explaining the inner workings of an OS. their OS implements several
ideas found in the Linux 2.4.3 kernel and is pretty easy to follow(comes
along with a PDF and source code for each lesson).

Here you have the state of the tutorials: http://sos.enix.org/en/MainPage

Ohh I forgot, SOS is implemented in C and ASM, but you can manage to do it
in C++.

Other resources include: www.osdever.net

Have fun

There is no problem, only solutions...
Some more links:
http://o3one.org/
http://my.execpc.com/~geezer/osd/index.htm
http://www.nondot.org/sabre/os/articles
Thanks everyone, good material.
_______________________"You're using a screwdriver to nail some glue to a ming vase. " -ToohrVyk
While the high level stuff can be written in C++, you'll still have to deal with asm at some point - the startup code, system init and OS core init is impossible to write in a high level language, unless the high level language is able to bootstrap itself (which is not the case of C++).

Regards,
See if you can track down a university class or Tannenbaum's books.

You're probably best to find decent books on this than scrabbling around on messageboards: most of the stuff I've seen is incomplete at best.
For moving a little higher level, above the "how to write an OS", there is also the question of good OS design. Each OS in the world needs to do the same things to interact with the hardware - access the BIOS, access the hardware, etc. But then are the differences - how they abstract the ideas, how they expose their features can vary wildly.

For that part, I highly recommend you look at the most wonderfull OS I've ever had the pleasure of working on ... BeOS. There was a book "Be Developer's Guide" which covers the main elements of the API. 3 things make BeOS distinct - 1) It is built from the ground up for pervasive multithreading and mutliprocessor leveraging (2 procs run the OS an average of 98% faster than 1 proc, thats better than any other general purpose OS), 2) It was built for the multimedia world, with an amazing media kit and a very responsive scheduler and timers, 3) It's primary programming API is actually well designed Object-Oriented C++, not structured C.

Whatever you choose to do, best of luck to you.

This topic is closed to new replies.

Advertisement