Higgs
Higgs

Reputation: 53

what is good about writing your own kernel

I'm very interested in operating systems programming.I want to write my own kernel from empty paper.I know C language well and a bit assembly.I've intended to buy Andrew tanenbaum's book: "Operating Systems Design and implementation" and start to read it. Everyone tell me that it is just a waste of time and it would be good if i give up such thoughts about writing own kernel. But I just want to know how everything works behind the scenes,Learning writing own kernel is just for educational purposes and i've not any illusion,that my OS will be huge and usable.

Is there any way to learn how OS works behind the scenes than buy A.T OS Design and Implementation"? is it enough to build my own linux distribution?, learning linux kernel development? or learn Windows Internals(Excellent book by Mark Russonovich)? in order to understand how everything works.

Thank you beforehand.

Upvotes: 1

Views: 4838

Answers (2)

Dan
Dan

Reputation: 7737

Of course, studying an existing open-source kernel such as Linux is helpful, but without some context (ie the Tanenbaum book or an OS class at a local/online university) you will probably be totally lost. I would recommend watching lectures about how an OS works, doing reading in a textbook alongside it, and only then starting to look at source code.

When you do start reading code from an existing kernel, try to find a hobby/learning OS. Most universities with a good OS course have a kernel they teach with (sometimes they have removed some pieces of the kernel which students must implement themselves as homework exercises), or you can always use Minix. If you use Minix to learn about OS topics, it might be a good idea to use an older version such as Minix2 - I read that the newer versions are more "production ready"/"inaccessible to beginners". And in any case, make sure you read the documentation before the code!

Upvotes: 0

siebz0r
siebz0r

Reputation: 20369

I think your best chances are to study the current Linux kernel. It is well established and widely used. It's available for free so why not? Writing your own kernel will take a huge amount of time and you will stumble upon stuff other people have figured out. Although creating your own kernel will be a very interesting project, don't re-invent the wheel. ;-)

Upvotes: 3

Related Questions