GNU/Linux is increasingly being seen as a viable, economical alternative to proprietary operating systems, and its market penetration, especially on servers, is increasing. To continue to grow Linux’s importance as a secure, low cost kernel, much more serious programmers are needed not only to keep improving it, but to develop stable drivers and most importantly to help continue the rapid Linux march to the Desktop.There is where Robert Love‘s new book comes in, Linux Kernel Development, 2nd edition, to introduce experienced programmers into the world of the Linux Kernel. The author is a very experienced Linux Kernel engineer, working for Novell.
This second edition is up to date, with just over 400 pages. It is easy to read, and might I dare say, even quite pleasant at some points. The book explains in detail all the major components of the current Linux Kernel (2.6) and in several cases compares it with older versions or other systems. It starts gently with some history and basic details and then dives into advanced topics such as scheduling of multiple programs on multiple processors, the interrupt system, and continues to memory management and the file system and various other interesting subjects, including debugging. At the end it has three appendixes and a very detailed index.
Every chapter explains in detail how a Kernel subsystem works, sometimes using very nice examples. While it contains many source examples, practically one per page, it is not swamped in source code.
The author succeeds in making even the most complicated subjects like multiprocessing synchronization, locking and the dreaded deadlocks, easy to understand using simple and nice examples. I found most topics clear and easy to digest.
But nothing is perfect in this world, so I have a few criticisms, for this otherwise well written book. It would be nice if it had more actual examples in some areas. For instance, it explains in great detail so much about Bottom Halves and how they work, even how they used to work, but beyond the theory I would like to see some actual examples of Bottom Halves, or even a list of common Bottom Halves in Linux, etc. Generally, maybe I’m asking too much but it would give a more complete picture in some chapters, if after the lengthy detailed theory of how a mechanism works and how the reader can make their own, it had more actual examples of the existing mechanisms built-in to Linux.
Also it would be great if some comparisons on all these internal operations were made to the market leader, Microsoft Windows XP.
The Linux Kernel is a huge subject, without underestimating the great job the author has put in these 400 pages, I would expect a book for the Linux kernel to be around 700-800 pages including a reference list or chart on all parts of the Kernel and their file names. Maybe in the next edition? Also, although this is not a specialized driver-writing book, it should have at least one chapter about drivers, as it is such an important subject.
On the other hand, this is a very good book, a good addition to a programmer’s bookshelf, it succeeds in describing the Linux Kernel in good detail, but in not too much detail. I am a newcomer to the Linux world, but have extensive experience on other operating systems. This book gave me quickly a good understanding of how the Linux Kernel works in detail, without boring me with endless source code or being too abstract. In other words it is well balanced in the level of detail it provides on its various subjects.
This is a serious book about a serious deep subject, if you are an experienced programmer wanting to enter the depths of the Linux Kernel or just you want to see how really does this Linux thing work, then I personally strongly recommend this book to you, as it was an enjoyable and quite thought provoking read for me.
Buy “Linux Kernel Development“ at Amazon.com |
About the Author
Michael Krech is the Director of Intelligent Firmware Ltd, Surrey, U.K. and an operating systems designer, having written a couple himself.
If you would like to see your thoughts or experiences with technology published, please consider writing an article for OSAlert.
I’ve also just finished reading it and found it a very educational book, althought sometimes a bit hard to understand as the topic is very complex.
I definitely agree that the LKD could expand a lot more – in fact, splitting between a “LKD basics” and a “LKD advanced” would be worth it IMO.
Ideas for future editions:
-I found the index to be incomplete as not all of the kernel functions shown in the book are indexed and those that are you have to look under “functions” to find them. This is pretty stupid for a book full of them!
-More diagrams to help understand the content and actual examples would be appreciated.
-Features of the kernel should have a note indicating at which version they appeared. Many parts of the book reads like a man page… It could perhaps start with a real-life example and explain it in details instead.
-The history of the kernel could be much more detailed. It would be nice to have some kind of “Heroes of the kernel” detailing the most spectacular contributions of the top kernel hackers as sidenotes to the relevant chapters.
-Areas of current and future areas of research would make a nice, inspiring appendices
-More parallels and comparison with what can be found in a standard OS book would make it more educational
-a “Suggested exercises” would end the chapters nicely
I also look forward to future editions from Mr Love with more diverse subjects added. The largest hole in the book being the lack of coverage of the networking aspect of the kernel. Subjects such as benchmarking, UML/Xen, OProfile, SELinux, crypto and LTT would also be worth covering as they mature (perhaps in a LKD avanced?).
The Linux kernel seems like the best kernel to study, since the source code is actually open. You can see what they are talking about it real.
I just don’t think that the computer industry sells operating systems or software because there is no real definition of quality.
At any rate, what can someone do with this knowledge of the kernel?
Figure that out RL and you will increase the demand for this book.
i just baught this book purely for cosmetics… its like the PERFECT book.. nice cover.. good binding.. awesome layout, fonts,.. and near perfect 20 + 10% off
do i need to upgrade from version 1 of the book?
ie – is there significant difference between the 2nd edition and the first?
“do i need to upgrade from version 1 of the book?”
No, but your bookcase will become quickly out of date if you don’t. If you do upgrade the book you’ll need to upgrade your shelves to make sure they’re not broken after the upgrade. This also means you might have to upgrade the floor, which the book depends on.
“No, but your bookcase will become quickly out of date if you don’t. If you do upgrade the book you’ll need to upgrade your shelves to make sure they’re not broken after the upgrade. This also means you might have to upgrade the floor, which the book depends on.”
Did you really think you are funny?
“Did you really think you are funny?”
Never even crossed my mind. Do you think your perception of humour is the same as everyone elses?
FWIW I was amused
don’t worry – my house has dependency resolution built in – if i upgrade a book, and the shelf needs doing, it does it automatically.
but you’re right, many tech books go out of date quickly – its an expensive business.
previously i didn’t have reverse dependency checking built in so i had to periodically garbage collect out the stale books – Tcl/Tk, Java and AWT, Python 1.5.2 ….
i have the first edition and i think the coverage of each topic is not too exhaustive not too superficial. My main complaint is its lack of figures and schemas, sometines it is quite hard to put all together, and draw a mental representation. i don’t know if i should buy the second ed. i prefer wait.
I don’t agree that this book should compare Linux with Windows, after all Windows is closed source so unless you work at Microsoft and have access to the Windows kernel, it’s all a bunch of lies. You have to see the code in order to know what is real and what is fiction. With Linux you can see the code, you can compile the code, it’s real.
> At any rate, what can someone do with this
> knowledge of the kernel?
Even if you will NEVER modify anything in the kernel, it helps both developers and sysadmins understand what is happening under the hood. This can be very useful to understand the interactions of your applications with the system.
One example: if you need to tune your OS to your needs, it helps when you actually understand what the various tuning options are for instead of just seeing them as magical knobs…
Another example: as users are able to compile their own kernel, it helps understand what the numerous configuration options actually do and why they exist.
So any serious Linux low-level system developer or system administrator should at least skim thru this book.
Ricky, that’s a satisfactory answer, you make some valid points.
Now I would like to grip about Windows being the market leader. Wait a minute, what market is this person talking about? Windows has a strong precence in the SMB market, but obviously saying that Windows is the market leader is a huge generalization, and it’s totally false!
I don’t know about OSAlert, it’s like people don’t really know anything, and why is this. Eugenia better start writing those good articles, because we sure as hell need them in order for the ordinary Joe’s to have a real understanding of this industry.
And the second is a solid sequel.
I personally challenged Mr. Love via email, and I think Novell could enjoy some cheap advertising thereby, to host a kernel wiki. Everyobody and they dog be gotten them wikis today, an’ junk. Why not the kernel? The book forms an excellent outline.
whats wrong with kernelnewbies.org
>whats wrong with kernelnewbies.org
Dunno.
What’s wrong with me is that I’ve yet to visit this trove o’ wisdom. Thanks.
> The Linux kernel seems like the best kernel to study, since
> the source code is actually open. You can see what they are
> talking about it real.
it would highly recommend netBSD over the linux kernel any day. the linux kernel is known for being a bit unwieldy and not always having the best written code. netBSD is written to be on the most platforms it can be, and is know for being very cleanly written and implemented (which helps it being the most portable).
linux is the most popular open source OS, but certainly not the best written or engineered.
Very informative, and RML’s writing style makes what could potentially be a very painful topic almost fun. Almost.
http://www.cs.colorado.edu/~nutt/kpfl.html
by Gary Nutt – a well known lecturer/writer on Oses.
the book is very veyr much excercise and project based – an approach that works better for a large number of people.
shame its still at kernel 2.2. he should do one for netbsd 2.0
> linux is the most popular open source OS,
> but certainly not the best written or engineered.
Did you read both OS source code to make this statement or is this based on hearsay?
>> linux is the most popular open source OS,
>> but certainly not the best written or engineered.
> Did you read both OS source code to make this statement or
> is this based on hearsay?
on a lot of research of done on newsgroups and other sources where people have read both sets of source code. i myself have not. but just because i have not read it myself, they does not mean i can disregard a whole lot of evidence pointing to a certain direction.
there are a lot of things i have not done myself (stared at the sun, taken a bath with a toaster plugged in), but i am going to go with the opinions of those more knowledgable on those issues also.
I have no problem with any platform that is open, so you are right, the book should compare Linux and netBSD kernels.
Nice understanding