LWN.net Logo

The Linux Kernel Primer

Your editor recently received a copy of The Linux Kernel Primer, by Claudia Salzberg Rodriguez, Gordon Fischer, and Steven Smolski, published by Prentice Hall. This volume describes itself as "the definitive guide to Linux kernel programming"; it has chapters on processes, scheduling, I/O, filesystems, memory management, and the bootstrap process. It appears to be a guide to internal kernel APIs for the 2.6 kernel.

Reviewing kernel-related books is a difficult task. Your editor could easily be seen as having a conflict of interest in such cases, with any criticism viewed as an attempt to steer purchasers toward his own, possibly competing work. So, in the interests of full disclosure, let it be said: the author of this review is an author of a different, kernel-related book, and anything found here should be viewed with suspicion.

Because the simple fact is that your editor cannot recommend this book. It shows every sign of having been put together in a hurry, with basic grammatical errors being a frequent occurrence. The material is disorganized, with no clear ordering of concepts. Factual errors are not hard to find. The sample code provided is visibly buggy.

The book does not say, anywhere, which version of the kernel is covered - something any serious reader will want to know. Various hints through the text suggest that the authors were working from the 2.6.7 kernel at the latest, however, making the book somewhat obsolete before it hits the shelves. The version of struct file shown in the book is from 2.6.1; struct page comes from 2.6.4. The list of I/O schedulers does not include CFQ - added in 2.6.6.

The fundamental fault in this book, however, is this: there is no mention, anywhere, of concurrency issues. Even the few pages devoted to interrupts fail to mention race conditions or the primitives used to control interrupt delivery. Spinlocks and semaphores do not merit coverage until page 409 - and, even then, the API for working with them is not discussed. There is no way to write code for the 2.6 kernel without taking concurrency into account. Your editor cannot understand why the authors felt that this topic could be passed over.

More documentation for the kernel is a good thing. The kernel is a complex program, and kernel hackers can certainly benefit from a variety of views of how the kernel API works. In this case, however, your editor would recommend staying with the other books in this field, including Linux Kernel Development by Robert Love, and Understanding The Linux Kernel by Bovet and Cesati (third edition due in November).


(Log in to post comments)

The Linux Kernel Primer

Posted Oct 6, 2005 15:56 UTC (Thu) by dmarti (subscriber, #11625) [Link]

Linux Device Drivers, 3rd ed. is good too.

The Linux Kernel Primer

Posted Oct 7, 2005 8:08 UTC (Fri) by hppnq (guest, #14462) [Link]

Seconded. I also like Linux Journal's Kernel Korner. ;-)

The Linux Kernel Primer

Posted Oct 9, 2005 19:50 UTC (Sun) by Blaisorblade (guest, #25465) [Link]

He's one of the authors of LDD, IIRC, so I guess he didn't want to advertise himself too much.

The Linux Kernel Primer

Posted Oct 17, 2005 14:26 UTC (Mon) by Zenith (subscriber, #24899) [Link]

He is one of the authors, and, taking a wild guess, I'm pretty sure the poster knew that and was just kidding around. ;-)

Copyright © 2005, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds