Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership

Book review: Understanding the Linux Kernel

By pmk in Technology
Wed Feb 14, 2001 at 06:04:24 PM EST
Tags: Books (all tags)

O'Reilly's Understanding the Linux Kernel, by Daniel P. Bovet and Marco Cesati (ISBN 0-596-00002-2, US$39.95, 684 pages), does a fair job of explaining a subset of the Linux kernel for the Intel x86 processor architecture.

I picked up this book to get up to speed on Linux kernel internals while porting the kernel to a new architecture. I've ripped through it and gleaned what I needed to know. Here's a short review for K5 readers who might find this book interesting.

The authors are university instructors, and the book is based on their lecture notes from a kernel internals course. As such, it's as much about operating system kernels in general as it is about the Linux kernel in particular. Its focus is the Linux 2.2 kernel for the Intel x86 processor architecture. This focus probably covers the widest audience, but I sure wish that they'd spent a couple of pages discussing what's different about Linux on more modern processor architectures. The text does do a good job explaining the x86's capabilities and weirdnesses, but not to the point that they become distracting. Occasionally the academic background of the material shines through in a comment or two that would have been better placed as a footnote, but on the whole, the style is direct and readable.

At the end of each chapter, the authors summarize the important differences between their presentation and the workings of the new 2.4 kernel, and do a good job doing so. Don't worry about this book already being obsolete.

The book covers all of the basic operations of the kernel: process management, scheduling, interrupt and exception handling, signals, memory management, the virtual file system, synchronization, SMP, buffering, System V IPC, and so on. A fair number of cleaned-up code samples are walked through. (The unfortunate dependence of the Linux kernel source on nonstandard GNU C extensions is avoided in their code samples.) The text is easy to follow, mostly because the Linux implementation of these facilities is pretty straightforward in the first place. A strong point of the book is their coverage of the ext2 filesystem in fine detail. The index is also excellent.

Two important areas are not covered at all, namely device drivers and the network stack. There's already an O'Reilly book on Linux device drivers, at least. The important topic of bootstrapping is covered too lightly. And they don't have any information at all on how to build a kernel from source.

This is not a book for programmers who are familiar with other implementations of UNIX; what they need to know about Linux could probably be summarized in just a few bullet points:

  • Linux is non-preemptive in Kernel mode, apart from interrupt handlers, which can run almost any time.
  • System calls switch to an empty Kernel mode stack, as is usual in UNIX implementations, rather than returning to an existing Kernel mode context.
  • Linux assumes a three-level page table for all architectures.
  • Process structures and Kernel mode stacks are kept together in a single contiguous block of memory.
But this book compares favorably with the classic Design of the UNIX Operating System by Maurice Bach (Prentice-Hall, 1986) as a practical introduction to kernel internals for those who are new to the subject, and I strongly recommend it for any programmer who's competent in C.


Voxel dot net
o Managed Hosting
o VoxCAST Content Delivery
o Raw Infrastructure


Related Links
o Also by pmk

Display: Sort:
Book review: Understanding the Linux Kernel | 9 comments (9 topical, editorial, 1 hidden)
There is another... (2.33 / 6) (#1)
by Sairon on Wed Feb 14, 2001 at 02:12:56 PM EST

book that I have, Linux Kernel Internals. I believe it is written by some kernel hackers. It is also good, although the one I have is the 2.0 kernel.


is today book report day? (1.60 / 28) (#2)
by rebelcool on Wed Feb 14, 2001 at 02:16:25 PM EST

ive never seen so many "ooh i gots me a book too ill make a post" reviews.

So heres my review of my c++ stl reference.

A bunch of mindlessly difficult to read nonsense about the STL, which is a mindlessly difficult to use piece of software.

I would put up the contents, but it would probably overload poor kuro5hin.

COG. Build your own community. Free, easy, powerful. Demo site

wow! (2.25 / 4) (#5)
by rebelcool on Wed Feb 14, 2001 at 07:55:04 PM EST

talk about a response! Though thanks to the apparent lack of humor on many user's parts, I can't see hidden comments now.

COG. Build your own community. Free, easy, powerful. Demo site
[ Parent ]

I feel for ya, man... (1.47 / 17) (#6)
by enani on Wed Feb 14, 2001 at 08:04:28 PM EST

Happens to all of us, from time to time.
--=* Moshi-moshi! *=--
[ Parent ]
Please rehide this comment! (1.66 / 9) (#9)
by enani on Thu Feb 15, 2001 at 11:54:21 AM EST

It was not posted by me! It was posted by my masu-baka brother! He's a poopyhead and he forgot to log me out so he could post his poopyhead comments! Please hide comment #6! Domo arigato!
--=* Moshi-moshi! *=--
[ Parent ]
Good book. :) (2.85 / 7) (#3)
by darthaya on Wed Feb 14, 2001 at 03:12:10 PM EST

It was an awesome book that covers a lot of the kernel basics. YOu can either use it as a guide for your kernel hacking adventure or keep it as a reference. Both good. Though it would be EVEN better if it could cover some of the networking part. I am hoping for the 2nd edition.

Another book to check (4.00 / 2) (#4)
by Inoshiro on Wed Feb 14, 2001 at 06:05:34 PM EST

Is "Linux Kernel Internals: Second Edition." It does cover building the kernel, as well as all the major subsystems, modules, device drivers, network subsystem, and multiprocessing. It has appendixes for all of the internal system calls, kernel related commands, the procfs implementation, and the boot process of the Linux kernel.

It only covers 2.0.x tree, though. I hope a third edition comes out soon :)

[ イノシロ ]
Book review: Understanding the Linux Kernel | 9 comments (9 topical, 0 editorial, 1 hidden)
Display: Sort:


All trademarks and copyrights on this page are owned by their respective companies. The Rest 2000 - Present Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
My heart's the long stairs.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories!