How much do you know about your kernel? Like really know?

Considering how critically important the Linux kernel is to the world—and, perhaps just as important, to our own personal computers and gadgets—it's rather amazing how little most people actually know about it.

There might as well be magical hamsters in there, pushing 1s and 0s around with their enchanted hamster gloves of computing power. How do kernels (in a general sense) actually work, anyway? How does one sit down and debug a specific Linux kernel issue? How does a kernel allocate and work with the memory in your computer? Those are questions most of us never need to ask—because Linux works.

Me, personally? Never submitted a single patch to the kernel. Not one.

I mean, sure. I've looked at little snippets of Linux kernel source code—mostly out of idle curiosity or to investigate a topic for a story. And I've compiled the kernel plenty of times to get one hardware driver or feature working. But, even so, my knowledge of the inner-workings of the kernel is mostly limited to "Linux power user" level.

So, it's time for a little kernel boot camp in this issue of Linux Journal to get a bit more up to speed.

Let's start with the basics. What is a kernel, and how, exactly, does a person go about making a brand-new one? Like...from scratch.

Linux Journal Editor at Large Petros Koutoupis previously has walked us through building a complete Linux distribution (starting from the very basics—see Part I and Part II). Now he does the same thing, but this time for building a brand-new kernel.

What tools are needed? What code must be written? Petros provides a step-by-step rundown of kernel building. In the end, you'll have a fully functional kernel (well, functional enough to boot a computer, at any rate) that you can build on further. Plus, you'll have a better understanding of how kernels actually work, which is pretty darn cool.

Moving back to Linux land, Frank Edwards gives a rundown on how the kernel handles memory: how virtual memory works and is structured, how the kernel reports memory usage and information to userland applications and the like. If you've ever wondered how the memory in your system is structured and interacted with by the applications and the kernel, give that a read.

Now that you know the basics of how to build a kernel, and a primer on how memory is used, let's turn to something directly practical for Linux developers and pro users: debugging Linux kernel panics.

Let's say, hypothetically, your machine has a kernel panic. Sure, they're rare, but they happen! But, but, why do they happen? How can you dig in and figure out the cause behind such a catastrophic event?

We bring Petros Koutoupis back in to give a detailed primer and how-to on doing exactly that. Hopefully, you never need to debug a kernel panic. But, just in case, best be prepared. (In the words of a famously pixelated old guy living in a cave, "It's dangerous to go alone! Take this.")

All of this information is great—detailed, technical and nerdy as can be (in the best possible way).

But, let's get a bit higher-level for a moment. What is being a kernel developer actually like?

What gets them started down the kernel programming path? What does an average day in the life of a kernel developer look like? What are their pet peeves about Linux (every developer on every project has complaints about it)?

To answer those questions, I sat down with prominent kernel developers from three of the most active companies in the Linux world: Red Hat, SUSE and Intel. (Since we had all three of those companies represented, this seemed like a good chance to talk about how they interact with other kernel developers working at other companies—often competitors.)

In the end, after reading all of the articles in the pages to follow, maybe you'll be inspired to take your first steps into the world of Linux kernel work. Or, heck, maybe you won't. But, either way, you'll hopefully have a deeper understanding of how Linux (and, by extension, your own computer) works.

Which is empowering. And awesome. And the Linux-y way.

Subscribers, you can download your May issue now.

Not a subscriber? It’s not too late. Subscribe now and receive instant access to this and ALL back issues since 1994.

Want to buy a single issue? Buy the May magazine or other single back issues in the LJ store.