Uh-oh, it looks like your Internet Explorer is out of date.

For a better shopping experience, please upgrade now.

Linux Kernel Programming, Third Edition / Edition 3

Linux Kernel Programming, Third Edition / Edition 3

5.0 1
by Michael Beck

ISBN-10: 0201719754

ISBN-13: 9780201719758

Pub. Date: 08/01/2002

Publisher: Addison-Wesley

From the Second Edition:
"If you intend to write kernel code or a kernel module, or just want to know how the kernel of a Linux system works, this book is an excellent source of information... I highly recommend this book for anyone who is serious about writing code or who wants to know what is in the Linux kernel."
-- Phil Hughes, Linux Journal


From the Second Edition:
"If you intend to write kernel code or a kernel module, or just want to know how the kernel of a Linux system works, this book is an excellent source of information... I highly recommend this book for anyone who is serious about writing code or who wants to know what is in the Linux kernel."
-- Phil Hughes, Linux Journal

Since the introduction of Linux version 1.2 in March 1995, the reliability and flexibility of this free operating system has attracted a vast community of programmers from all over the world. Now at version 2.4, Linux is being successfully employed in commercial software development by internet providers and in research and teaching.

As the acknowledged leading reference on the subject, this third edition of Linux Kernel Programming is for anyone who requires a deeper understanding of the operating system. It explains the technology internals of the successful Linux OS, including:

  • memory management
  • the virtual file system switch
  • Linux device drivers
  • inter-process communication
  • networking

This third edition of Linux Kernel Programming:

  • has been thoroughly updated throughout to cover Linux 2.4
  • tells you all you need to know about the structure of the kernel, the heart of the Linux operating system.

The accompanying CD-ROM contains the Linux Kernel version 2.4.4, plus sources from other programs and documents from the Linux Documentation Project.


Product Details

Publication date:
Edition description:
Updated and Extend
Product dimensions:
7.48(w) x 9.18(h) x 0.98(d)

Table of Contents


Preface to the 3rd Edition.

Preface to the 1st Edition.

Torvalds' Preface to the 1st Edition.


1. linux — the Operating System.

Main Characteristics.

Linux Distributions.

2. Compiling the Kernel.

Where is Everything?


Additional Configuration Facilities.

3. Introduction to the Kernel.

Important Data Structures.

The Task Structure.

The Process Table.

Files and Inodes.

Dynamic Memory Management.

Queues and Semaphores.

System Time and Timers.

Main Algorithms.


Hardware Interrupts.

Software Interrupts.

Booting the System.

Timer Interrupts.

The Scheduler.

Implementation of System Calls.

How Do System Calls Actually Work?

Examples of Simple System Calls.

Examples of More Complex System Calls.

4. Memory Management.

The Architecture-Independent Memory Model.

Pages of Memory.

Virtual Address Space.

Converting the Linear Address.

Page Directories.

The Page Table.

The Virtual Address Space of a Process.

The User Segment.

Virtual Memory Areas.

The System Call BRK.

Mapping Functions.

The Kernel Segment.

Memory Allocation in the Kernel Segment During Booting.

Dynamic Memory Management in the Kernel Segment.

Block Device Caching.

Block Buffering.

Bdflush and Kupdate.

List Structures for the Buffer Cache.

Using the Buffer Cache.

Paging Under Linux.

Memory Management and the Memory Cache.

Reserving a Page of Memory.

Optimization of Memory Page Management Via Kernel Threads.

Page Errors and Reloading a Page.

5. Interprocess Communication.

Synchronization in the Kernel.

Communication via Files.

Locking Entire Files.

Locking File Areas.


Debugging Using Ptrace.

System V IPC.

Access Rights, Numbers, and Keys.


Message Queues.

Shared Memory.

The IPCS and IPCRM Commands.

IPC with Sockets.

A Simple Example.

The Implementation of Unix Domain Sockets.

6. The Linux File System.

Basic Principles.

The Representation of File Systems in the Kernel.


The Superblock.

Superblock Operations.

The Directory Cache.

DEntry Operations.

The Inode.

Inode Operations.

The File Structure.

File Operations.

Opening a File.

The Ext2 File System.

The Structure of the Ext2 File System.

Directories in the Ext2 File System.

Block Allocation in the Ext2 File System.

Extensions of the Ext2 File System.

The Proc File System.

Structures of the Proc File System.

Implementation of the Proc File System.

7. Device Drivers Under Linux.

Character and Block Devices.


Port I/O.

The PCI bus.

The Dinosaur — the ISA Bus.


Polling, Interrupts, and Waiting Queues.


Interrupt Mode.

Interrupt Sharing.

Software Interrupts.

Bottom Halves — The Lower Interrupt Halves.

Task Queues.


Implementing a Driver.

Example of a PC Loudspeaker Driver.

A Simple Driver.

The Setup Function.


Open and Release.

Read and Write.






Readdir, Fsync.

Dynamic and Static Drivers.

8. Network Implementation. 0

Introduction and Overview.

The Layer Model of the Network Implementation.

Getting the Data from A to B.

Important Structures.

The Socket Structure.

The sk_buff Structure — Buffer Management in the Network.

The INET Socket — A Special Part of the Socket.

Protocol Operations in the Proto Structure.

The General Structure of a Socket Address.

Network Devices under Linux.



The Loopback Device.

The Dummy Device.

An Example Device.

9. Modules and Debugging.

What are Modules?

Implementation in the Kernel.

Signatures of Symbols.

The Meaning of Object Sections for Modules and Kernels.

Parameter Transfer and Examples.

What Can be Implemented as a Module?

The Kernel Daemon.

Simple Data Swapping between Modules.

An Example Module.


Changes are the Beginning of the End.

The Best Debugger — printk().

Debugging with gdb.

10. Multiprocessing.

The Intel Multiprocessor Specification.

Problems with Multiprocessor Systems.

Changes to the Kernel.

Kernel Initialization.


Interrupt Handling.

Atomic Operations.

The Atomic Data Type.

Accessing the Atomic Data Type.

Changing and Testing Atomic Variables.

Spin Locks.

Access Functions.

Read-Write Spin Locks.

Appendix A: System Calls. 3

Process Management.

The File System.


Memory Management.

All That Remains.

Appendix B: Kernel-Related Commands. 3

Free — Overview of the System's Memory.

PS — Output of Process Statistics.

Top — The CPU Charts.

Init — Primus Inter Pares.

Shutdown — Shutting Down The System.

strace — Monitoring a Process.

Configuring the Network Interface.

Traceroute — Ariadne's Paths in the Internet.

Configuring a Serial Interface.

Configuring a Parallel Interface.

Building a Directory Tree.

Appendix C: The PROC File System. 6

The /PROC/ Directory.

The NET/ Directory.

The SELF/ Directory.

The SYS/ Directory.

Appendix D: The Booting Process. 3

Carrying Out the Booting Process.

LILO — The Linux Loader.

Appendix E: Useful Kernel Functions.


Index. 0201719754T05172002

Customer Reviews

Average Review:

Post to your social network


Most Helpful Customer Reviews

See all customer reviews

Linux Kernel Programming, Third Edition 5 out of 5 based on 0 ratings. 1 reviews.
Guest More than 1 year ago
the book is very fine, and recommended for all people