In order to thoroughly understand what makes Linux tick and why it works so well on a wide variety of systems, you need to delve deep into the heart of the kernel. The kernel handles all interactions between the CPU and the external world, and determines which programs will share processor time, in what order. It manages limited memory so well that hundreds of processes can share the system efficiently, and expertly organizes data transfers so that the CPU isn't kept waiting any longer than necessary for the relatively slow disks. The third edition of Understanding the Linux Kernel takes you on a guided tour of the most significant data structures, algorithms, and programming tricks used in the kernel. Probing beyond superficial features, the authors offer valuable insights to people who want to know how things really work inside their machine. Important Intel-specific features are discussed. Relevant segments of code are dissected line by line. But the book covers more than just the functioning of the code; it explains the theoretical underpinnings of why Linux does things the way it does. This edition of the book covers Version 2.6, which has seen significant changes to nearly every kernel subsystem, particularly in the areas of memory management and block devices. The book focuses on the following topics: Understanding the Linux Kernel will acquaint you with all the inner workings of Linux, but it's more than just an academic exercise. You'll learn what conditions bring out Linux's best performance, and you'll see how it meets the challenge of providing good system response during process scheduling, file access, and memory management in a wide variety of environments. This book will help you make the most of your Linux system.
OK, "read" is a strong word. I skimmed and skipped. I definitely do not understand the Linux kernel. But I do know what a process is*, so that's something, I guess.
Quite a nice book. There were one or two thnigs that I haven't seen in other books so far, but I had a gut feeling that it's the right way to go. There were a couple of things that I am not relaly convinced about, but maybe it all depends on the context. All in all, I think it was well wrtiten and wotrh reading.
This is a terrific book to start turning yourself from good to great in a specific area of the Linux kernel, because it focuses on internals aspects without providing too much additional context. For exactly the same reason, it's probably not such a useful book if you want to go from mediocre to good, but this seems by design. I think this is the right choice for such a subject matter.
The book is written for 2.6, and contains quite a few code samples. The kernel has advanced a lot since then, however, and so one should take the specific examples with a pinch of salt. However, it does provide a catalyst to ask further questions to find out more information about how the kernel works now. Most of the overall fundamentals still remain correct, so one should probably take this book as a high level guide, and less as an in depth dig into kernel code. The only bits which are a bit more hairy are 32-bit specific aspects, which are not marked as such due to 32-bit's ubiquity when the book was originally written. Most of these are simple enough to pick out (eg. a lot of highmem concepts go out the window), but some are not.
"Container"-type concepts that are now critical to the Linux kernel are more or less missing entirely due to the age of the content (for example cgroups, namespaces, etc). Since these now are critical parts of the operating system whether you directly use them or not (eg. the memory workingset is cgroup-based), this is pretty important, although many of the existing principles discussed do transpose acceptably.
I'd like to see a version of the book with updated concepts from more recent kernels (4.0+), which would allow one to have more confidence that (say) mm, scheduling, or synchronisation concepts and primitives still are the same now. As it is, one can't be entirely sure, and has to manually dig in a bit to see how things have changed.
I'd suggest picking the chapters that interest you and discarding the ones that don't, or coming back to them later. Where previous concepts are reused, the book makes sure to note where to look them up, so it's easy enough to dart back and read a smaller subsection out of a larger chapter which you've skipped.
Overall though, an essential book if you want to become proficient at introspecting into Linux-specific kernel behaviour, or debugging kernel issues, from an existing background where you are in general familiar with operating systems concepts.
I'm not reading this to understand every line of the (2.2) Linux kernel, but rather to get a general overview of, and familiarity with, how GNU/Linux distros are (or were) underpinned by the kernel and how Linux interacts with hardware.
I'm only on chapter five but I'm getting what I want and expect. The book is actually more much detail than I'm looking for but I'd rather have more detail than I want, and skip over it, than have the author skip over it for me. I can always come back to interesting or relevant sections later.
Bovet and Cesati have a very thorough understanding of the Linux kernel and explain everything right down to memory addresses, macros and assembly code. They've obviously spent time poring over each line of C and assembly to understand it well enough to be able to explain the C and re-write the assembly in the roughly equivalent C code.
Want to be a kernel hacker? Don't start with this book. It's much better as a reference. For example, the whole discussion on the process address space is very confusing because it assumes that you already understand a whole bunch about protected mode programming on the x86, and, when discussing the implementation of page tables, etc, doesn't really make it clear that some facets of the implementation are due to i386 limitations, while others are conscious design decisions by the Linux kernel developers. The book is riddled with this sort of thing and it's more likely to obfuscate than to elucidate.
Still, if you're not going in cold, this is a very valuable book that every kernel hacker should have on his/her desk.
If you want to understand the Linux kernel, yep, this is what you should be reading.
If you want to get a decent feel for how a real-world operating system is implemented, you'd do pretty well to read this book. Because of the nature of describing what features the kernel has to provide, this book even serves somewhat to describe primitives that programs in general, and modern multithreaded programs in particular, require from an operating system.
Problems? A few. The details in a book like this will quickly go out of date, although parts, such as the higher-level understanding of how a typical OS works, are really timeless. Also, this book absolutely focuses on x86 architecture: the kernel can run on other architectures, but the any implementation details that are OS-specific are only described for x86. In terms of structure, the book is organized pretty well, although a few small sections are basically code snippets with hardly additional commentary.
Just one example that struck me as funny, and illustrates the limited lifespan of some of the analysis: at one point, the author mentions that it's impractical to store an entire data structure in memory, because it would consume a full megabyte of RAM to do so!
This is book is amazing to learn the Linux kernel designs. The book only covers designs in Linux version 2.6, which is quite outdated already, but I think the majority of it remains (almost) the same. Note that this book is not trying to guide you to start developing the kernel. For example, it covers all of the kernel synchronization API along with its inner mechanism, but it doesn't let you know on when to use it (which is important if you want to be a kernel developer). So it is best to use as a reference instead of as a starting point to learn kernel development.
Covers the kernel in more detail than the alternatives. Good book when you want details and don’t want to read the code. Problem is that it’s too out of date in a lot of the parts.
This is not light reading in any sense. At almost a thousand pages, it's even heavy stuff physically. The content, though, is excellent and reminds me how impressive the achievements of the open source movement have become. Linux may not be UNIX in the technical, or trademark sense, but it is an almost perfect work-alike that is very difficult to distinguish from the real(tm) thing. The kernel (core) of the operating system was created from scratch for the most part, and probably looks very different from the original UNIX kernel. (I've never seen the source code for that.)
The authors do an excellent job of describing the mechanics of Linux, probably in more detail than most users would find interesting. But for an old coder and administrator like myself, this was pretty fascinating. A good reference to keep on hand for those of us who are deeply involved in the insides of our machines.
As a design choice, the Linux Kernel has very little assembly code. This book takes a lot of assembly code and explains it in a horrible way. A made up example is like The security_assert function saves the contents of some of the registers by the following: Movl eax,esi Pushl eax Movl eax,(Ebx-10h) pushl eax
Even being good at assembly, how this code works is not apparent. All non assembly functions are very shortly described in tables. Many are not more in depth than security_getaram: gets security parameters
My afvice: stay away f I'm this book. Try Robert Love's book
I think I prefer Robert Love's Linux Kernel book which covers the general design of the kernel in a more high-level way. This delves a little too far into the details and I'd prefer to just read the source instead of this book at that point. I may stop reading this soon.
Whew, this was dense stuff. I hadn't read anything related to kernels since college so it was really interesting to see how much things have changed. I'd recommend this only to hard core kernel geeks. This isn't a light treatment.
A detailed overview of what's going on the kernel. Rather intricate and definitely not bedside reading. It makes you appreciate the complexity of what's happening under the hood and glad someone's already taken care of (most of) it.
Very detailed, very interesting. A book I would purchase every year just to keep up, if updating its contents was not such a daunting task for the authors.
Really great coverage of all the parts of an operating system (Linux in particular). It has a lot of breadth if you skim it, but also a lot of depth if you read a section through and through.