Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Roadblocks in creating a custom operating system [closed]

It seems to me that the most common overly ambitious project that programmers (esp. Comp. Sci. grads) try to tackle is building your own operating system. (Trying to create your own programming language + compiler is probably even more common but not nearly as ambitious.)

For those (like myself) foolish enough to try: aside from the sheer size, what are the biggest gotchas or unexpected roadblocks you've encountered in trying to create your own OS from the ground up?

Edit: A great OS question: What are some resources for getting started in operating system development?

like image 734
Dinah Avatar asked Dec 04 '08 14:12

Dinah


2 Answers

Being able to speak from actual experience (AROS, the biggest obstacles are:

  • Hen and egg (no os <-> no apps <-> no users <-> can't attract developers)
  • Why even try to compete against Windows? Apple doesn't succeed and they have lots of money and Linux doesn't succeed despite having an enormous and enthusiastic community.
  • Big companies aren't interested at all to bring their apps to your OS (Adobe Acrobat Reader, MS Office, Macromedia Flash, Java from Sun). Without these, and no good OSS alternatives, you can't attract users.
  • It takes very long. In my case, it's been roughly 15 years to get a 1.0 (and we're not 100% there, yet).
  • Compatibility. In order to get any users, you must be compatible to something that exists (so people can continue to use their data, etc). If you're compatible, why change to your OS?

So if you plan to write your own OS, you should consider this:

  • It will take a long time
  • For the longest time, you will be alone. I was lucky because I had this enormously fanatic and dedicated Amiga community which just wouldn't let up.
  • You must find a niche where you can offer a service which no other OS can offer.
  • People who can do this often get better job offers because the perception is "writing OSs is hard" :)
  • You will be a member of a very small, elite group of programmers that can say "I wrote my own OS and it can do more than print 'Hello world!'"
like image 138
Aaron Digulla Avatar answered Sep 22 '22 20:09

Aaron Digulla


Been there, done that. The biggest obstacle, for me at least, was device drivers. Coding the OS core is the "fun part", however it is useless without being able to do I/O (disk, keyboard, video, network, at least). Today, if I again had the time and will to engage into such project, I'd probably target Xen VM instead of the raw hardware -- if for nothing else, then because it hides many ugly idiosyncrasies of x86 as well as hardware. Xen presents a nice uniform, hardware-independent view of I/O devices, and still gives you enough freedom to play with the "interesting" OS parts (mm, process management, synchronization, interrupts, etc).

like image 36
zvrba Avatar answered Sep 20 '22 20:09

zvrba