Live data from Hacker News

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

news.ycombinator.com

31–40 of 84 posts

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

#31

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 have heard of Haiku,but haven't looked at it in a while. However, I have heard great things about it and would certainly be interesting in learning and contributing

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

#32
Years ago in school, I decided to figure out how the Linux kernel works. So I've downloaded the sources and open them with a notepad++. After an hour I've figured out that I have no idea what am I reading in the code, close the notepad++ and never open it back. Buy the sources are still awaiting in some old directory at my home's PC :)

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

#33

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 have heard of Haiku,but haven't looked at it in a while. However, I have heard great things about it and would certainly be interesting in learning and contributing

I and most of the other developers hang out on Freenode#haiku, and of course on our mailing lists. Come say hello and get involved, indeed. More than happy to teach :)

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

#34
post #11

Yes, there is just so much, and it is not thoroughly documented. "BPF maps" in particular are a) a special feature of a special feature that's Linux-specific, not anything that generalizes across OSes, and b) a feature for userspace anyway, not for kernel internals. But even longstanding kernel-internal features aren't well documented (e.g., the other day I was trying to figure out what struct file's f_version does,…

Perhaps I should've said more. I do often end up googling basic OS stuff, especially related to memory (software interrupts still confuse me though, I understand the concepts, but never the implementation), but even more so have been my ignorance of hardware level concepts. For example trying to patch the code for a network card the other week, I learned what watchdog timer is, I've never heard of that prior.

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

#35
The Linux kernel is unfortunately pretty far from UNIX nowadays but if you want to understand the basic concepts behind UNIX I think Lions' Commentary on UNIX is still the best resource out there:

https://www.amazon.com/Lions-Commentary-Unix-John/dp/1573980...

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

#36
"Operating Systems: Three Easy Pieces" is a more modern book to OS concepts, explained with real source code as opposed to algorithms, and is regularly updated.

http://pages.cs.wisc.edu/~remzi/OSTEP/

(Online version above, you can also order a print copy).

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

#37
post #11

Yes, there is just so much, and it is not thoroughly documented. "BPF maps" in particular are a) a special feature of a special feature that's Linux-specific, not anything that generalizes across OSes, and b) a feature for userspace anyway, not for kernel internals. But even longstanding kernel-internal features aren't well documented (e.g., the other day I was trying to figure out what struct file's f_version does,…

> The basic trick of dealing with the kernel is becoming comfortable working in a large codebase most of which you don't understand, and figuring out how to find what you need. Honestly, git grep is one of the best tools here.

That's a very good point. If we're recommending tools, cscope (especially if you're a vim/emacs user) or opengrok (if you're not or prefer a web frontend for other reasons) are super helpful for navigating and comprehending large, mysterious codebases.

DTrace/eBPF are also valuable tools for grokking kernel functionality.

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

#38

"Operating Systems: Three Easy Pieces" is a more modern book to OS concepts, explained with real source code as opposed to algorithms, and is regularly updated. http://pages.cs.wisc.edu/~remzi/OSTEP/ (Online version above, you can also order a print copy).

I took this class (although not from him). it's a good textbook and was pretty much sufficient.

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

#40

OSTEP is the best book on Operating systems easily. http://pages.cs.wisc.edu/~remzi/OSTEP/

Not sure if it is the best book overall, but I used it for one of my college classes and I think it is a great book for learning much more about operating systems. And it is available for free online so my college student wallet loved it!
Post reply on HN