Linux Internals: a Book Review

by Ralph Krause

Title: Linux InternalsAuthor: Moshe BarPublisher: OsborneISBN: 0-07-212598-5

According to its introduction, Linux Internals "was written to enhance the general understanding of the inner workings of Linux". With chapters covering topics such as the virtual memory (VM) manager, filesystems and the scheduler, the book seemed to be able to do this. Unfortunately, the book is a disappointment for two main reasons: it is poorly edited and its content is difficult to follow.

This book isn't meant to be the definitive guide on kernel programming, nor is it intended to explain how every line of code works; therefore, experienced kernel hackers won't find much here for them. The book covers several broad areas of the kernel and attempts to explain their purposes in an operating system in general and Linux in particular. The book also highlights changes from the 2.2.x kernels to the 2.3 kernels. (It was written before the 2.4.x kernels were released.)

Linux Internals was written by Moshe Bar, who is a columnist for and a contributor to magazines such as Dr. Dobb's Journal. He is currently leading the openMosix cluster project and has been working with computers since 1981.

In addition to the topics mentioned above, the book's ten chapters also cover the history of Linux, compiling a kernel, base functions of the kernel, the Linux processes model, signals handling, the kernel HTTP daemon (kHTTPd) and system calls. At the end of each chapter is a listing of the header files associated with the chapter's topic. These listings aren't referenced in the text, however, so it's hard to see their purpose.

The largest section of the book is the chapter on filesystems. The author devotes considerable time to illustrating how the kernel interacts with the filesystem, along with an explanation of how a journaling file system works. IBM's Journaling File System(JFS) is then singled out and covered in great detail.

The book contained several items that I found useful and interesting, including the coverage of locks and kernel timing, how runtime priority of threaded applications is controlled and the scheduler. The author also illustrates under what conditions the kernel HTTP daemon is useful and includes code snippets for modifying kernel behavior. The bibliography contains many sources of information on operating systems for anyone wishing to read up on the historical or technical aspects of them.

Another aspect of the book that I liked was the discussions of how things such as the VM manager and SMP code have evolved and the trade-offs associated with the decision to use certain code.

The book contains so many errors, however, that it distracts from the reading. Examples include an author's note to himself to amplify the material about Minix on page 3, a figure with the caption "Please provide figure caption" in chapter 3 and paragraphs that seem to be duplicated. With these types of problems, it does not appear that this is a finished product.

Some parts of the book, such as the header file listings at the end of each chapter, seem to have been added as padding. The chapter on compiling a kernel isn't very useful either. While the chapter does contain some information on what kernel source code goes in each subdirectory and a very brief summary of kernel coding standards, it really doesn't provide much for somebody already familiar with Linux. Another example of questionable material is the section on Java exception objects in chapter 9, "Linux System Calls". The section just before this one introduces exceptions and their uses but nothing ties this to Java, nor does any later text relate Java exceptions to the kernel.

In conclusion it is hard to see that very many people will find this book useful. This is a shame since I've read several columns by Mr. Bar and have found them to be easily readable, interesting and informative. This book's sheer number of errors and uneven chapter content will make it difficult for a novice to get through, and experienced programmers won't like it because it isn't a kernel programming guide. Readers might be better served by looking for another kernel book or by looking to the web for answers to their questions.

Ralph Krause is an avid reader, programmer, web page designer and writer who lives in Michigan.

Load Disqus comments