Jump to content
  • Advertisement
Sign in to follow this  
M2tM

Build OS from scratch

This topic is 4473 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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,

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!