Michael Beck is the director of software development for the DResearch Digital Media Systems GmbH. Harold Boehme teaches computer science at Humboldt University. Ulrich Kunitz is a software project manager for Internet Banking Solutions. Claus Schroeter works in the Chemie.De information service.
Preface.
Preface to the 3rd Edition.
Preface to the 1st Edition.
Torvalds' Preface to the 1st Edition.
Acknowledgments.
1. linux — the Operating System.
Main Characteristics.
Linux Distributions.
2. Compiling the Kernel.
Where is Everything?
Compiling.
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.
Signals.
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.
Pipes.
Debugging Using Ptrace.
System V IPC.
Access Rights, Numbers, and Keys.
Semaphores.
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.
Mounting.
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.
Hardware.
Port I/O.
The PCI bus.
The Dinosaur — the ISA Bus.
ISA-PnP.
Polling, Interrupts, and Waiting Queues.
Polling.
Interrupt Mode.
Interrupt Sharing.
Software Interrupts.
Bottom Halves — The Lower Interrupt Halves.
Task Queues.
Timers.
Implementing a Driver.
Example of a PC Loudspeaker Driver.
A Simple Driver.
The Setup Function.
Init.
Open and Release.
Read and Write.
IOCTL.
Poll.
Llseek.
Mmap.
Fasync.
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.
Ethernet.
SLIP and PLIP.
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.
Debugging.
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.
Scheduling.
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.
Communication.
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.
References.
Index. 0201719754T05172002