Linux Core Kernel CommentaryScott MaxwellCoriolis, 1999 Reviewed November 29, 1999 The Linux Core Kernel Commentary was patterned on the classic Lions' Commentary on Unix, which was a Unix hacker's resource for years. The Commentary on Unix helped to spread the Unix source - and the Unix way of doing things - when that source was still (at least intended to be) proprietary. The Linux Core Kernel Commentary finds itself in a very different environment; the kernel source is, of course, already widely distributed throughout the world. This is a heavy book, weighing in at 575 pages in a large format. Of those pages, 415 go toward printing just under 40,000 lines of source from the 2.2.5 kernel; the remaining 160 pages make up the "commentary" part. The source code listing is pretty much what one would expect it to be. Numerous source files from the "core" part of the Linux kernel are printed, all together, with line numbers. One thing the listing lacks desperately is any sort of guide headers on the pages. It's necessary to page backward to the beginning of a source file to find out which file you are actually looking at. Note that the source listing truly only covers the "core" kernel. Much of the kernel, including networking code, device drivers, filesystems, and more is left out. This narrowing of scope was almost certainly necessary, in order to get a book of a manageable size. The commentary section is broken up into several chapters: a couple of overview chapters, system initialization, system calls, signals and interrupts, processes, memory, System V IPC, symmetric multiprocessing, and a section on tunable parameters (/proc/sys). Again, the scope is limited to "core" functionality. The individual chapters start with some straight explanatory material. This text gives an overview of how a subsystem works, often with useful diagrams showing data structures and flow of control. Then there is a series of one-paragraph notes, each tied to a specific line in the source listing. The introductory sections are informative and clearly written. It is not entirely clear, however, how the rest of the book is intended to be read. The notes themselves do not make for any sort of coherent reading experience. Associating them with the code is hard, since it involves a lot of turning back and forth. It's hard not to think that a different organization might not have worked a little better. A two-column format where the comments sit next to the code they describe would have made for a much more pleasant code browsing experience. And the linear introductory material should really all be together, where it could be read in an uninterrupted mode. In essence, this book tries to be both an annotated code listing and a tutorial on how the kernel works. The organization of the book makes it not entirely successful at either, even though the information is there. There are also occasional inaccuracies in the text. For example, the initialization chapter reads: Cleaning up after ("reaping") a process that has exited is first the responsibility of the process's parent; if its parent already exited, the grandparent is responsible; if the grandparent already exited, the great-grandparent is responsible, and so on.In fact, "orphaned" processes immediately become init's responsibility; any processes in between are bypassed. The book comes with a CDROM containing a number of kernel versions: 0.01, 2.2.5 (the version discussed in the text), 2.2.10, and 2.3.12. The development kernel was guaranteed to be highly obsolete before the first copy hit the shelves, but, then, it doesn't hurt to have it there. The Linux Core Kernel Commentary is not perfect. Nonetheless, it contains a great deal of good information, and I am glad to have it on my shelf. Those who are interested in digging around in the kernel source will likely want to pick up a copy. --jc |
Copyright 1999
Eklektix, Inc. all rights
reserved.
Linux ® is a registered trademark of Linus Torvalds