![]() |
|
And now, as the saying goes, for something completely different. Linux Core Kernel Commentary, by Scott Maxwell, is an intriguing and useful approach to publishing books about Linux, the ubiquitous open-source operating system. This book consists primarily of two parts--a 415-page, 39,338-line source-code listing for selected parts of the Linux kernel, and a 144-page commentary that explains the source code and provides a stealth introduction to numerous operating system and computer architecture concepts.
The publisher points out in its marketing material that the good news about open source is that you get the source code, but the bad news is that you get all the source code--millions of lines of it in some cases. Anyone who's tried to pick up a sizable open-source project and make even a small change knows how true this observation is, and what a staggering chore it can be. Given the capabilities, complexity, and still-skyrocketing interest in Linux, there will be no shortage of programmers of all levels of expertise looking for help in understanding Linux's source code. The obvious, though not necessarily easy to answer, question is ,"Is Linux Core Kernel Commentary the book to fill that role?"
Maxwell's commentary is arranged in 11 chapters: Introduction to Linux; A First Look at the Code; Kernel; Architecture Overview; System Initialization; System Calls; Signals, Interrupts, and Time; Processes and Threads; Memory; System V IPC; Symmetric Multiprocessing; and Tunable Kernel Parameters. He does a conspicuously good job of mixing Linux-specific information with more general operating systems material without boring readers who are already familiar with virtual memory, interrupts, and similar concepts. I was particularly happy to see that he likes to explain something in a formal way and then present a shortcut via an image or analogy. This kind of high-wire act can be perilous and lead the reader to wrong conclusions or implications, but Maxwell never takes a misstep.
Linux Core Kernel Commentary starts with the expected high-level overviews of Linux and operating systems, and then presents a detailed treatment of Linux's printk(), basically the kernel's own version of printf(). He next delves into Linux's architecture, and from there is off on a march through various subsystems. Throughout the book he refers to areas of the source code via line number, allowing you to flip back and forth between the source listing and the explanation. The source code also has numerous tags that point the reader to related places in the explanation.
One thing that struck me as I read the book is the even tone of Maxwell's prose. It's not hard to find Linux books that are written by true believers, resulting in a fair amount of boosterism mixed in with the technical information. Maxwell clearly likes Linux, but he doesn't tattoo the fact on his forehead; his book and his readers both benefit from his laid-back approach.
The one suggestion I would have made for this book would have been the addition of an appendix that followed the execution of a slightly complicated "Hello, world" program, from Linux's view. Showing how application execution, memory allocation and deallocation, and console I/O works in that context would have been useful. True, all the key concepts of this example are covered throughout the book, but a sample or two like this could have helped tie it together slightly better for the Linux and OS neophytes.
The biggest single drawback to Linux Core Kernel Commentary is how little of Linux it covers, out of necessity. (The book is already thick and oversized, even by computer book standards.) As Maxwell points out on page 441, about 39,000 lines of code are presented in the book, chosen from over 1.7M lines in the 2.2.5 kernel. Even taking into account the platform-specific parts of the kernel, which are understandable omissions, this still pushes out some of the most interesting and visible parts of Linux, such as I/O and command shells. Other areas of interest that aren't part of the kernel (such as X and device drivers) aren't covered, but would presumably make good topics for other volumes.
Even though Maxwell does an excellent job with many different concepts and countless details, the book still suffers just slightly from myopia. There's simply so much detail about the trees, even this small subset of them, that there's not much room for a description of the forest.
The book's CD-ROM includes the source for version 2.2.5, 2.2.10, and 2.3.12 of the kernel, the latter two being the latest stable and development versions available when the CD-ROM was created. It also has the 39,000 lines of code from the book in a single file, along with an Emacs LISP file to help navigate the file. For the perversely curious, the CD-ROM also includes a copy of the 0.01 kernel that dates back to 1991.
Any programmer who wants to understand the core of the Linux kernel in this detail, whether out of curiosity or in connection with a specific project, will find Linux Core Kernel Commentary to be a terrific start.
-- Lou Grinzo
| Readability |
|
| Originality |
|
| Organization |
|
| Accuracy |
|
| Consistency |
|
| Depth |
|
| Timeliness |
|
| Editing |
|
| Design |
|
| Overall Value |
|
Explanation of ERCB rating scale: No stars = unacceptable, 1 Star = marginal, 2 Stars = average, 3 Stars = above average, 4 Stars = exceptional.