Live data from Hacker News

Ask HN: Recommended resources to learn the Linux kernel and OS theory?

news.ycombinator.com

41–50 of 84 posts

Re: Ask HN: Recommended resources to learn the Linux kernel and OS theory?

#41

Operating Systems: Three Easy Pieces [1] XinuOS [2] MIT's xv6 OS [3] [1] http://pages.cs.wisc.edu/~remzi/OSTEP/ [2] https://xinu.cs.purdue.edu/ [3] https://github.com/mit-pdos/xv6-public

+1 for xv6. The commentary book is really well written, and is a straightforward introduction to a lot of important ideas.

https://pdos.csail.mit.edu/6.828/2014/xv6/book-rev8.pdf

Re: Ask HN: Recommended resources to learn the Linux kernel and OS theory?

#42
The old standards.

Stevens to start. If you don't already know Stevens' thoroughly first, I wouldn't go deeper. The kernel is not separable from the userland-facing API.

I'm not convinced you actually need to / want to understand actual internals. But assuming you do, next is Tanenbaum (maybe start with the newer "Modern" book).

"Operating Systems: Three Easy Pieces" also seems well regarded, although I haven't read it myself.

The FreeBSD book is great, if you're specifically interested in BSD. There's also a video lecture you can buy on McKusick's site. I had the pleasure of an on-site presentation and it is absolutely fantastic.

Re: Ask HN: Recommended resources to learn the Linux kernel and OS theory?

#44

The OSDev wiki can probably teach you anything you need to know about "OS theory" (and practice, mostly on x86): https://wiki.osdev.org/Expanded_Main_Page Depending on your style of programming, I'd recommend maybe not working on Linux if you are trying to learn kernel development and OS internals. Have you looked at Haiku ( https://www.haiku-os.org/ )? We have a very well organized and commented modular-monolitic ke…

> I'd recommend maybe not working on Linux if you are trying to learn kernel development and OS internals.

Could you also tell why ?

Re: Ask HN: Recommended resources to learn the Linux kernel and OS theory?

#45
Many folks here are recommending reading up on production grade operating systems which might be a very steep learning curve.

I'd recommend starting with an academic operating system to nail the fundamentals down, once you have a solid foundation you can then use all the excellent links provided by everyone else and ramp up on production grade kernels.

I have linked to multiple course syllabus'es below from excellent institutes, pick whichever feels most comfortable.

Harvard with MIPS based OS/161 (I learned this personally): http://www.eecs.harvard.edu/~cs161/syllabus.html

Berkeley EECS 162 (John Kubiatowicz is amazing and is behind RISC V) https://inst.eecs.berkeley.edu/~cs162/sp19/

MIT OCW: https://ocw.mit.edu/courses/electrical-engineering-and-compu...

Re: Ask HN: Recommended resources to learn the Linux kernel and OS theory?

#46
post #44

The OSDev wiki can probably teach you anything you need to know about "OS theory" (and practice, mostly on x86): https://wiki.osdev.org/Expanded_Main_Page Depending on your style of programming, I'd recommend maybe not working on Linux if you are trying to learn kernel development and OS internals. Have you looked at Haiku ( https://www.haiku-os.org/ )? We have a very well organized and commented modular-monolitic ke…

> I'd recommend maybe not working on Linux if you are trying to learn kernel development and OS internals. Could you also tell why ?

The Linux kernel is really, really large, and changes extremely rapidly, to the point of breaking such "experiments" (as the original poster already noted.) It's also rather loosely commented and, aside from a handful of core systems, not so well documented.

The BSDs do much better here; they have excellent manpages for almost all kernel APIs, manuals for how the internals work, and very good source code commenting and organization practices. Haiku is not as good as the BSDs on manpages and manuals, but that's the only real way we differ from them (in this respect.)

Re: Ask HN: Recommended resources to learn the Linux kernel and OS theory?

#47
I've been making my way through this course https://classroom.udacity.com/courses/ud923

It's about 9 years old I think so might be too out of date for you, but I've been really enjoying it. I think they have an advanced version of the course as well if you're already familiar with the basics

Re: Ask HN: Recommended resources to learn the Linux kernel and OS theory?

#48
post #21

My somewhat off-beat recommendation is "Lions' Commentary on UNIX 6th Edition with Source Code". The sources to a 1976 version of Unix written in an archaic dialect of C and targeting a long-dead CPU architecture are obviously not of immediate relevance to the modern world, and may well not be to your taste unless you already have some sympathy with the idea of retrocomputing. But if you do: 6th Edition is small enou…

And you can witness the glory of swtch() and the original "You are not expected to understand this" comment.

Highly recommended.

Re: Ask HN: Recommended resources to learn the Linux kernel and OS theory?

#49
Zhao Jiong released this excellent work in English not too long ago: http://www.oldlinux.org/download/ECLK-5.0-WithCover.pdf If you know Chinese it was originally done in that language, details are on http://www.oldlinux.org/ It heavily comments / explains everything in the linux kernel v0.12. Quite some time ago, but I agree with the assessment on its relevance for an "inductive understanding". The growth since then is largely in new subsystems, new drivers, but maybe not so much in core theory...

If you're more into the core theory and less about Linux in particular, a fun project-oriented approach to get more familiar with the basics would be to get a little development board for an ARM CPU and try to make a multi-tasking (real-time) OS for it from scratch.

Re: Ask HN: Recommended resources to learn the Linux kernel and OS theory?

#50
post #49

Zhao Jiong released this excellent work in English not too long ago: http://www.oldlinux.org/download/ECLK-5.0-WithCover.pdf If you know Chinese it was originally done in that language, details are on http://www.oldlinux.org/ It heavily comments / explains everything in the linux kernel v0.12. Quite some time ago, but I agree with the assessment on its relevance for an "inductive understanding". The growth since then…

Thanks, I haven't this one, it seems interesting.
Post reply on HN