

Learning OS programming? - iimushka

Hi Guys. I am a freshman in Computer Science and wanna specialize in OS. if i wait for university to teach me,it would take 2 or more. By now i only know about C programming at some rate. My question is what do i have to learn to understand and write my own OS(at least like sipmle linux-s),and in which order that is the best ? and some good books &#38; refs on these. What i need is clear path for beginning, whatever it takes i`ll learn anyway :)<p>for example, 
c--&#62;algorithms--&#62;assembly&#38;machine--&#62;kernel.....etc 
tnx iimushka
======
andymoe
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...](http://ocw.mit.edu/courses/electrical-engineering-
and-computer-science/6-828-operating-system-engineering-fall-2006/readings/)

------
merijnv
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.

------
rickr
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...](http://www.amazon.com/Operating-Systems-Design-
Implementation-3rd/dp/0131429388?tag=dudugo-20) )

------
jwhitlark
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.

------
smithbits
<> 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.

------
dazzawazza
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.

~~~
Strunk
<http://linuxgazette.net/77/krishnakumar.html>

just with a little google. :)

------
iwr
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>

------
nwmcsween
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.

------
peterbotond
hack kernel in userspace.:-) lots of fun and let your mind bend.
<http://netbsd.org/docs/rump/index.html> <http://netbsd.org/docs/>

------
RiderOfGiraffes
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+system%3F)

------
geekytenny
Check out minix3.org it is a small os you can read (source code) and play
with.

------
iimushka
Great, thank you guys :)

