The Linux kernel is complex, large and feature-rich. Learning about it is not an easy task, not just because of its complexity and enormity but because it is constantly under development. This makes Linux a bit of a moving target.
Moreover, there’s one key difference between Linux and other operating system. Linux gets the definition of operating system wrong. Basic jobs that a kernel is actually responsible for involve stuff like scheduling, memory management, etc. Drivers and libraries actually just interface with the kernel thanks to the interface (ABI) that the kernel exposes. Which has led to the popular phrase, “Its not Linux, its GNU/Linux”. GNU being the rest of the stack, libraries etc and Linux being the kernel.
But misinformed folks will often wander into the internals of the Linux Kernel whereas their intention was something completely different starting out. With out of the way, here are some of the resources, that will help you learn about operating systems in the abstract along with the specificity of the Linux Kernels.
1. Operating System concepts
This books digs deep into the idea of what an Operating system ought to be, in the abstract. At the same time, it has a solid foothold into the practicalities of real world. The companion website offers a Linux VM that can be used to actually work through some of the challenges that the book offers. So even the abstract ideas will mostly be implemented in Linux by the reader.
Furthermore, it has elaborate sections where the case studies for popular operating systems are done and you get to see the distinction between Linux (which is just the kernel) and full-fledged operating systems like Windows 7.
Level: Intermediate
2. How Linux Works
Released by No Starch Press, this is one of the finest book to show you… well, how Linux works. Everything from Kernel’s management of filesystem and memory to the detailed description of I/O, networking and storage are discussed within this book.
The boundary where Linux ends and your Ubuntu, Arch, CentOS, etc begin will be made clear as well. If you run Linux you have all the prerequisites to go through this book.
Level: Beginner
3. The Linux Kernel Documentation
So far we have stuck to books. However, books get outdated quickly and can only help us so much. The Linux kernel documentation can guide you through your journey into the heart of the matter.
There is something for everyone. The documentation is neatly divided into sections for Users, Application developers and Kernel developers. You can get a practical gist of how bugs discovered and reported, and feature requests made. Of course, everything is centered around the Linux kernel, so chances are, you won’t be allowed to stray away from your aim, in this website.
This is an indispensable resource when it comes to the staying up-to-date as well. Since the documentation is where you will see the first sign of patches and new features.
Level: N/A
4. LFD 420 and LFD 440
Although quite expensive, these are some of the highest rated courses from the Linux foundation. My recommendation, here, is from anecdote rather than personal experience, but people have benefitted enormously from these courses.
The LFD 420 course is for intermediate level whereas the next course is for much more advanced users. The courses are provided by the Linux Foundation and delves deep into the topics of kernel architecture, workings, security and much more.
Honourable Mention: Design and Implementation of FreeBSD
There’s a lot that Linux actually gets wrong, and learning about the Kernel as if it is an entity of the natural world waiting to be studied is a wrong approach. It is not for nothing, that Linux users are accused of fanaticism. To avoid getting trapped into the echo chamber of Linux, this book would help you immensely.
The book doesn’t only talks about the operating system, FreeBSD but also about its kernel. I chose FreeBSD to contrast against Linux for a multitude of reasons. First, FreeBSD is used quite a lot in the real-world. It has enabled companies like iXsystems, Netflix, Delphix and WhatsApp to run their servers. About 25% of the entire US’ internet traffic flows through FreeBSD, thanks to the popularity of Netflix alone. So it can be used for some serious heavy-lifting.
Secondly, FreeBSD is proper UNIX. With clear distinction between userland and kernel and various other intelligent design choices, that seasoned Linux kernel developers can appreciate and adopt.
Level: Intermediate to Advanced
Conclusion
When learning about anything as enormous as the Linux Kernel, you first need to define your goals. This maybe involve understanding how it works, how to debug it, how to write kernel modules, etc.
Once the goal is well-defined, you will find it hard to stray way into unnecessary topics and heated debates that Linux community is infamous for. Its okay if the goal changes as you understand more about the system. It is far better to nativagate by yourself than to get adrift by opinions and authority.