Chapter 1: A New Perspective on Kernel Programming — Building Your Kernel Workspace from Scratch
There is a class of problems that appear to be "engineering problems" on the surface, but are actually problems of "privilege and perception."
Chapter 2: Building the 6.x Linux Kernel from Source (Part 1)
Building the Linux Kernel from Source: A Long Journey
Chapter 3: Building the 6.x Linux Kernel from Source (Part 2)
Chapter narrative: In the previous chapter, we configured the kernel like prepping a surgical table. Now the scalpel goes down—we're going to slice into the code, compile it, install it, and watch it awaken under GRUB's guidance. This isn't just typing commands; this is handcrafting the soul of an operating system.
Chapter 4: Hello, Kernel — Linux Kernel Modules and Kernel Architecture Basics
Chapter Prologue: Privilege and Boundaries
Chapter 5: Writing Your First Kernel Module — Part 2
This might be the first time you realize that "modularity" in real-world engineering doesn't just mean throwing things into separate folders. In the previous chapter, we got a minimal kernel module up and running—like learning to light a fire with a lighter. But if you're actually going to survive winter on that fire, you need a system that doesn't just start fires, but controls them, prevents backfires, and automatically adds fuel when it gets cold.
. Kernel Mechanism Essentials — Processes and Threads
In the last chapter, we got our feet wet with kernel modules. By now, you should be able to write some simple code inside the kernel. But that's just the tip of the iceberg. The Linux kernel is massive, complex, and profound. If we want to navigate it freely, knowing only printk is far from enough.
Chapter 7: Inside Memory Management
Kernel internals, especially memory management, is a vast and complex field. To be honest, I don't plan to spill all the gory low-level details in this book—that would probably take two more books to cover.
Chapter 8: Kernel Memory Allocators: The Buddy System and Slab
8.0 Introduction: When the Kernel Starts Managing Memory
Chapter 9: Advanced Kernel Memory Allocation: Choices, Reclaim, and Survival
In the last chapter, we explored the underlying logic of kernel memory allocation—the perpetually running engine known as the Buddy System—and the Slab Allocator built on top of it. If you thought that was the whole picture, you might be underestimating the complexity of this system.
Chapter 10: CPU Scheduler (Part 1)
Chapter Introduction
Chapter 11: CPU Scheduler (Part 2)
Introduction: The Illusion of Control
Chapter 12: The Price of Concurrency — Kernel Synchronization Mechanisms Part 1
The previous two chapters covered scheduling, and everything looked orderly and well-organized. But that was because we had the luxury of focusing on just "one process" at a time.
Chapter 13: Kernel Synchronization (Part 2)
This is not just a tutorial on "how to lock." We've survived the foundational洗礼 of the previous chapter, and now we face the truly tricky problems in kernel synchronization—the ones that really test your understanding of the system's underlying mechanics.