Review: Linux Kernel Development
[Posted November 25, 2003 by corbet]
Writing books about the Linux kernel is hard. The subject matter is vast,
complex, and highly technical. It also is very much a moving target;
![[Book cover]](/images/ns/linux-kernel-development.jpg)
today's kernel book becomes obsolete in a short period of time. So kernel
authors have to pick their subject matter carefully, time things well, and
enjoy their fifteen minutes of fame before somebody merges a patch and
their words begin the inevitable slide into obsolescence.
The latest kernel book to hit the shelves is Linux Kernel
Development by Robert Love.
The goal of this book is perhaps best expressed by Andrew Morton in the
foreword. He notes that kernel development has become increasingly complex
as the kernel grows and scales to larger systems. That complexity
increases the functionality and performance of the kernel, but it comes
with a cost: the kernel is harder to understand than it once was.
I believe that this declining accessibility of the Linux source
base is already a problem for the quality of the kernel, and it
will become more serious over time. Those who care for Linux
clearly have an interest in increasing the number of developers who
can contribute to the kernel.
The purpose of this book is to help developers get to where they can make a
contribution.
Linux Kernel Development covers a lot of ground. There are chapters
on process management and scheduling, how system calls work, interrupt
handling (but not device drivers in general), delayed work mechanisms,
locking and mutual exclusion, timers, memory management, filesystems and the
block layer, the page cache, kernel debugging, and more. This book,
however, is just over 300 pages long, so it necessarily does not cover any
of these topics in any great depth. Thus, for example, you will see what
each of the inode_operations methods is, but there is little
information on how to write one. Linux Kernel Development is a
starting point which will prove useful to any developer trying to get up to
speed with one or more kernel subsystems. Completing that process,
however, will still require setting down the book and diving into the
source.
That said, this book is truly a good starting point. After having perused
the text on a particular subsystem, the reader will have enough background
to be able to make sense of the source much more quickly than before. The
presentation is clear, the writing is enjoyable to read*, and
the information is accurate and useful.
Linux Kernel Development belongs on the shelf of any developer who
is interested in kernel work.
One small complaint that one might make is that it is hard to figure out
just which version of the kernel this book covers. The fine print on the
back notes that it covers 2.6. Of course, the book was published in
September, and now, at the end of November, the 2.6 kernel has not yet been
released, so that statement is not entirely accurate. A suitably attentive
reader can find places where the current kernel diverges from the text of
this book - the listing of struct inode lacks the i_cdev
field, for example. Kernel books will always tend to be like that,
however; they are only completely accurate when they are out of date.
Mr. Love appears to have timed things pretty well with this one;
the differences between the text and the current development kernel are
minimal - so far. For the time being, Linux Kernel Development is
the best description of the structure and API of the 2.6 kernel available.
[Disclaimer: your reviewer is the co-author of a Linux Kernel book which
could be seen as competing with Linux Kernel Development, though he
sees the two as being entirely complementary. Buy Both.]
*Though sprinkled with rather more footnotes that your reviewer
might have preferred...
(
Log in to post comments)