Learning OS programming?
12 comments
Lesson one: C is a case sensitive language and so is english. Apologies for the snarkiness but I could not let it go.
Anyway... This is an interesting read: http://cm.bell-labs.com/cm/cs/who/dmr/hist.html
Also check out this reading list: http://ocw.mit.edu/courses/electrical-engineering-and-comput...
Anyway... This is an interesting read: http://cm.bell-labs.com/cm/cs/who/dmr/hist.html
Also check out this reading list: http://ocw.mit.edu/courses/electrical-engineering-and-comput...
I highly recommend "Operating Systems: Design & Implementation" by Tanenbaum. It is a very clear book dealing with a lot of design and implementation details of operating systems. It has an in depth discussion of the Minix source and design decisions made. Now Minix does not have such a large user base as Linux, but in my kernel hacking experience in both Minix and Linux so far the Minix sources are far more pleasant to hack on.
OSDev ( http://wiki.osdev.org/Main_Page ) has a bunch of great stuff. Start at the top and work your way down.
Also, Operating Systems Design and Implementation, aka the Minix book, is an amazing resource.( http://www.amazon.com/Operating-Systems-Design-Implementatio... )
Also, Operating Systems Design and Implementation, aka the Minix book, is an amazing resource.( http://www.amazon.com/Operating-Systems-Design-Implementatio... )
<> Find out which operating system the OS class at your university uses, waaaay back in the day it was AT&T Unix, then there was Minix, these days it's usually a flavor of Linux or BSD.
Find the web page for the class that has the build instructions for it and follow those. Get all the source code together and compile and run it. Now make some simple change like altering a boot string to say "Yay I did this." Don't use on of the pre-built VMWare images that just require you to type "make". Download the source code, download GCC and figure out all the configuration stuff needed to build the whole OS. Learn a little bit about each of the tools involved but stay focused on building and running whatever OS it is.
Once you get that far pick one of the easy early exercises like modifying the memory manager or playing with the process scheduling algorithms. Doing all that should give you a pretty good idea if you want to really specialize in OS's and you will do very well when you do take that class.
I'm a big fan of http://www1.idc.ac.il/tecs/ (The Elements of Computing Systems) It takes you from logic gates all the way up, showing just enough at each level to give you a real view into what's going on there.
I think once you've got through this book, you'll have a great base for anywhere you want to go, including OS programming.
I think once you've got through this book, you'll have a great base for anywhere you want to go, including OS programming.
I'd recommend writing a toy operating system, there are many tutorials online. That will give you a good start. I wrote a small x86 kernel many years ago following online tutorials. It's great fun. You'll learn a lot from doing.
Since you are at university ask around for a professor that teaches or is an expert in Operating Systems and seek his advice. That's why [s]he is there.
Since you are at university ask around for a professor that teaches or is an expert in Operating Systems and seek his advice. That's why [s]he is there.
http://linuxgazette.net/77/krishnakumar.html
just with a little google. :)
just with a little google. :)
I once wrote a brainfuck interpreter in assembler which would run at boot time. It's Turing completeness closer to the machine.
But the internet already thought of that and crazier things: http://www.masella.name/technical/BF-CPU.pdf
But the internet already thought of that and crazier things: http://www.masella.name/technical/BF-CPU.pdf
Don't learn C, learn assembly and take a few ee courses. Learn about new and interesting operating systems written in type safe languages. Linux, FreeBSD and friends while practical are all based on ideas from the 1970's and IMO are bound to die out within the next 20 years.
hack kernel in userspace.:-) lots of fun and let your mind bend.
http://netbsd.org/docs/rump/index.html
http://netbsd.org/docs/
Google is your friend:
http://www.google.com/search?q=how+do+I+write+an+operating+s...
http://www.google.com/search?q=how+do+I+write+an+operating+s...
Check out minix3.org it is a small os you can read (source code) and play with.
Great, thank you guys :)
for example, c-->algorithms-->assembly&machine-->kernel.....etc tnx iimushka