← Back to context

Comment by ianai

8 years ago

I wonder where best to start for people who haven't taken an OS class before?

CS:APP 3rd (64bit) edition http://csapp.cs.cmu.edu/

Lectures for it are here: https://scs.hosted.panopto.com/Panopto/Pages/Sessions/List.a...

This teaches you C, x86-64 arch, stuff like two's complement integers and floating point, how memory and CPUs work, how the C compiler works (linking stage, preprocessor), and how to write/understand signals and processes, file I/O, network code ect.

After that you can just start reading the OpenBSD code and will figure it out or get an Andrew S Tanenbaum book on Operating Systems.

Note, if you buy the Pearson Global Edition of CS:APP (it's only 10% the reg price) there's a lot of errata you will have to check. I once got stuck reversing an assembly program into C that did an even/odd parity check because of a print error returning the final XOR'd value & 0 instead of & 1.

For a good base, I recommend the book "The Design and Implementation of the FreeBSD Operating System" by Marshall Kirk McKusick. It's really in depth and I was able to follow it without previously taking an OS course.

Currently they mostly seem to be doing utilities, not kernel stuff, so there should be fairly little OS stuff required.

The best start would be to read a book about operating systems such as Tanenbaums. Reading the source of an OS has a really really low signal to noise ratio in getting important knowledge about operating systems due to implementation details an OS-specific peculiarities.

  • What about MINIX? Being a teaching operating system, do you think it may contain less nose and thus be more useful as reading material? (I mean, without the book)

    • Linus Torvalds started out studying MINIX. He was a Finnish programmer into working on kernels. He ended up completing one.

That depends on what you want to learn.

If you want to improve your code reading skills and/or C programming skills, then you can probably go ahead and start reading, for example, the OpenBSD source code, even though you don't have any operating systems knowledge.