Å·±¦ÓéÀÖ

Jump to ratings and reviews
Rate this book

Understanding the Linux Kernel

Rate this book
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.

942 pages, Paperback

First published October 1, 2000

182 people are currently reading
1,453 people want to read

About the author

Daniel P. Bovet

7Ìýbooks11Ìýfollowers
Daniel Pierre Bovet

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
273 (38%)
4 stars
277 (39%)
3 stars
138 (19%)
2 stars
16 (2%)
1 star
6 (<1%)
Displaying 1 - 30 of 30 reviews
Profile Image for Zanna.
676 reviews1,057 followers
April 20, 2017
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.

*it's an instance of a program in execution
Profile Image for Frank Naitan.
14 reviews5 followers
Read
December 6, 2019
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.
Profile Image for Chris Down.
5 reviews4 followers
December 18, 2018
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.
Profile Image for Chris Maguire.
147 reviews6 followers
September 1, 2015
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.
Profile Image for Dave.
9 reviews237 followers
July 29, 2007
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.
238 reviews10 followers
July 24, 2011
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!
5 reviews
February 8, 2022
Excellent book!

Really explains anything you need to know about the Linux kernel!

Would also recommend Linux Kernel Development for extra knowledge after being done with this book
9 reviews
January 16, 2019
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.
Profile Image for Maggie.
5 reviews
August 19, 2019
Sweet story and quick read. Loved all the poetry woven throughout.
29 reviews
October 30, 2019
Long and a little bit outdated, but helps understand kernel principles
Profile Image for Mohamed Shams.
24 reviews8 followers
January 3, 2024
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.
Profile Image for Altivo Overo.
AuthorÌý6 books18 followers
August 26, 2015
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.
46 reviews4 followers
May 30, 2015
Way too much ASM

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
Profile Image for Chris.
67 reviews1 follower
May 21, 2009
Still slowly going through this.

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.
Profile Image for Mike.
36 reviews3 followers
January 7, 2008
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.
16 reviews
August 5, 2011
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.
299 reviews8 followers
Want to read
December 15, 2010
Made it partway in and didn't get any further. Didn't get in far enough to say whether it was really worthwhile or not (hence, no finishing).
Profile Image for Nick Black.
AuthorÌý2 books865 followers
March 23, 2008
All things considered, a very well-constructed and comprehensive book. There's a third edition out now, with far superior coverage of 2.6.
Profile Image for Finda.
8 reviews1 follower
April 7, 2008
wah manteb pokoknya nih buku..mengupas segala macam mpe dalemanya kernel...cuman emang rada tebel..tp cocok bet kalo mo ngoprek Linux
Profile Image for Miah.
AuthorÌý1 book10 followers
Read
August 16, 2012
I constantly refer to this more for reference than anything else. I've read many of the chapters but I'm sure there are still things to learn here.
Profile Image for Richard.
8 reviews
September 9, 2016
More detailed, but harder to read than Robert Love's Kernel book
76 reviews1 follower
January 31, 2016
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.
19 reviews
July 4, 2014
This is an excellent book. Not only does it teaches how to code linux, but also explains why for the design.
Profile Image for Connor Stack.
232 reviews8 followers
May 15, 2016
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.
Displaying 1 - 30 of 30 reviews

Can't find what you're looking for?

Get help and learn more about the design.