Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing an Operating System?

Status
Not open for further replies.

cpjust

Programmer
Sep 23, 2003
2,132
US
I'm the kind of person who likes a challenge, so I've been playing around with the idea of writing my own OS. Nothing fancy (yet), just something small like DOS.

From what I've read on some sites about writing an OS, they say I'd have to write my own C runtime library. This is where it gets a little confusing... Do I have to write the C runtime lib (and maybe a C compiler) in assembly, or can I do it in C on something like Linux, but compile it so it will run on my own OS?

The sites also say writing a bootstrap program is a royal pain, so I'd just use GRUB instead.

Drivers are another scary thought. Do I need to write my own drivers for everything, or can I somehow use existing drivers?

Any other advice about writing an OS would be greatly appreciated.
 
I have to ask ... if you want to write your own OS, then surely the first step is to write your own bootstrap and file system ? If you find that too much of a hassle, then whats the point ?! If you are going to use a linux based file system and boot loader, then why not just use the rest of it aswell ? If there are parts of linux you find unsatisfactory, then would your efforts not be better redirected to writing an alternative ?

There are challenges, and then there are challenges. IMO, if you need to ask about boot loaders, then you don't possess the skills to actually write your own !

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
I don't want to write an OS to make it better than another OS. I just want to do it for the experience (and because I'm bored). I know for a fact that I don't currently have the "skills" to write an OS, but I found that the best way to learn something is just to jump right in and either sink or swim.

I don't think the boot loader is really considered part of the OS. It just loads the OS when you turn the machine on. If I ever finish my OS I might replace GRUB with my own boot loader too, but I just want to get the base OS working first.

I don't know if I'll ever have enough time to finish this huge project, but I'm sure I'll learn a few things along the way.
 
Simply creating a pair of tasks which context switch and send messages to one another is a pretty illuminating experience.


--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top