Question

what is a way to create a my own operating system using c++. I have been created boot loader (using nasm,qemu) but I haven't knowledge to add an kernel to this boot loader.

No correct solution

OTHER TIPS

Here's a ton of information that you'll eventually need, the dreaded OS programming FAQ.

Be careful, C++ is pretty heavyweight for an OS kernel.

  • There are services like exceptions that you'll have to support with a runtime library.
  • It won't feel like C++ until you add a heap.
  • Kernels are very sensitive to where objects are allocated; the one-heap model usually used in C++ isn't really suitable.
  • Coupling APIs to data structures is a bad idea. BeOS had problems with this. You need to hide the size of your internal structures from users, and that means jumping through hoops (Pimpl, private constructor, virtual functions) when APIs are member functions.

It sounds like you're already further along than most, so keep asking questions and you'll probably end up somewhere nice! :vD

Also to add, This book by Tanenbaum, where he explains the implementation details of minix.

You may consider looking at MINIX which is a small operating system for x86 systems. It was originally designed as a teaching project and has evolved into something that's intended to be useful in the real world.

I am not familiar with details, but by my knowledge BeOS was written in C++. Sources should be freeley available as well as the documentation.

you can take a look at minix 3 source code. it's a very simple os, created with the purpose of understand how operating system works.

you can also study all the tanenbaum book about os. they are all very complete and I remember that one book has the complete source of minix attached and commented

For a C++ operating system, you may want to look at NewOS or UnixLite.

A usable operating system can be developed on the top of L4, even by a single student in one semester along with other courses (but with all driver issues already resolved). If found this being a great adventure, and the L4 microkernel is also kind of advanced.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top