Review: Linux Kernel Development Second Edition
Novell Cool Solutions: Feature
By Kirk Coombs
Digg This -
Posted: 16 Aug 2005
From the publisher:
Linux Kernel Development details the design and implementation of the Linux kernel, presenting the content in a manner that is beneficial to those writing and developing kernel code, as well as to programmers seeking to better understand the operating system and become more efficient and productive in their coding.
The book details the major subsystems and features of the Linux kernel, including its design, implementation, and interfaces. It covers the Linux kernel from both angles, theoretical and applied, which should appeal to readers with a variety of interests and needs.
The author, a core kernel developer, shares valuable knowledge and experience on the 2.6 Linux kernel. Specific topics covered include process management, scheduling, time management and timers, the system call interface, memory addressing, memory management, the page cache, the VFS, kernel synchronization, portability concerns, and debugging techniques. The book covers the Linux 2.6 kernel, including many of its interesting features, such as its O(1) scheduler, preemptive kernel, block I/O layer, and I/O schedulers.
Linux Kernel Development comes highly recommended to anybody who desires to learn more about the Linux kernel. Each chapter begins simple, and leads the reader into the chapter's topic in a way that prepares the newcomer well, but does not bore the expert. The writing style is very personable, and even includes the occasional witty comment. The information is organized logically and concisely--it makes a great textbook to guide the learner through the entire kernel, or a perfect reference book for those who need to brush up on specific topics.
The topics covered are familiar to anybody who has worked with Real-Time Operating Systems; it begins with a discussion on processes and threads, and continues with the process scheduler. Next, it delves into system calls, interrupts, and kernel synchronization. Once the basic foundation has been laid there are chapters on timers and time management, memory management, filesystems, block devices, the block I/O layer, and much more. Through the entire book an architecture-independent view is taken. There is even an entire chapter devoted to portability.
Linux Kernel Development is perfect for anybody who wishes to write kernel code, whether it's a driver, interrupt handler, or kernel module. Included within the text are samples of simplified kernel code which illustrate what is being taught, as well as examples of the current add-on--such as a "Hello World" kernel module. There are even appendices on the kernel's linked lists, true random number generator, and algorithmic complexity. A working knowledge of the C programming language is strongly reccomended before reading this book.
The Linux kernel is an open-source community effort, and this book acknowledges this fact. While it may focus on the 2.6 kernel series, much care is taken to discuss the past history of the kernel and indicate why the community decided to make the modifications that have lead the kernel's current state. It encourages community participation, devoting a chapter to explaining how to get involved in the community, what the kernel coding standards are, and how to submit bug reports.
The Linux kernel is the foundation of a great operating system, and Linux Kernel Development is the foundation to understanding the Linux kernel.
- Introduction to the Linux Kernel - Overview of what a kernel is, the history of kernels in Unix, and how the Linux kernel came about.
- Getting Started with the Kernel - Shows where to get the kernel source, how to build the kernel, and how kernel programming is different than traditional C programming.
- Process Management - Discusses the ideas of processes and threads, showing how they are implemented in the Linux kernel.
- Process Scheduling - Teaches about the challenges of managing processes and process priorities, and shows how the scheduler is implemented in Linux.
- System Calls - Tells what system calls are, how they are used, when a new one should be created, and how to create them.
- Interrupts and Interrupt Handlers - Discusses what interrupts are, how the kernel deals with them, and how to write an interrupt handler. This chapter covers writing the "top half" handler.
- Bottom Halves and Deferring Work - Continues the discussion of interrupts from the previous chapter. Shows how to write a "bottom half" interrupt handler, including softirqs, tasklets, and work queues.
- Kernel Synchronization Introduction - Shows the importance of protecting data in the kernel as multiple tasks run. Introduces critical regions, race conditions, locking, and deadlocks.
- Kernel Synchronization Methods - Teaches the various methods of ensuring synchronization in the Linux kernel (atomic operations, spin locks, semaphores, etc.).
- Timers and Time Management - Overview of time in computing, and how it relates to the Kernel. Describes the timer interrupt handler in the kernel, the RTC, using timers, etc.
- Memory Management - Overview of how memory is managed in Linux including memory pages, allocating and deallocating memory in the kernel, the slab layer, and per-cpu memory allocation.
- The Virtual Filesystem - Describes how Linux accesses all filesystems through one interface: the virtual filesystem.
- The Block I/O Layer - Teaches about how block devices are created and used in the Linux kernel, including the data structures, queues, and I/O schedulers used.
- The Process Address Space - Describes the kernel structures necessary to make memory available to user processes.
- The Page Cache and Page Writeback - Describes how the kernel caches writing operations to reduce disk I/O.
- Modules - Kernel code can be expanded on the fly through the use of modules. This chapter describes how to write one.
- kobjects and sysfs - Describes the kobjects device model, and how it relates to sysfs.
- Debugging - Gives tips for kernel debugging including print statements and loggers, patched-in debuggers, and the SysRq keys, among others.
- Portability - Overview of the challenges for making the Linux kernel portable, and how the kernel gets around these hurdles.
- Patches, Hacking, and the Community - An invitation to join the Linux kernel community. Tells how to get involved, submit bugs, and what coding style to use.
- Appendix A: Linked Lists - Overview of the linked list structures available in the kernel.
- Appendix B: Kernel Random Number Generator - Overview of the kernel's true random number generator.
- Appendix C: Algorithmic Complexity - Discusses the concept of algorithmic complexity and demonstrates the importance of keeping kernel code efficient.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com