Understanding the Linux Kernel"O'Reilly Media, Inc.", 2002 - 765 pages To thoroughly understand what makes Linux tick and why it's so efficient, you need to delve deep into the heart of the operating system--into the Linux kernel itself. The kernel is Linux--in the case of the Linux operating system, it's the only bit of software to which the term "Linux" applies. The kernel handles all the requests or completed I/O operations and determines which programs will share its processing time, and in what order. Responsible for the sophisticated memory management of the whole system, the Linux kernel is the force behind the legendary Linux efficiency. The new edition of Understanding the Linux Kernel takes you on a guided tour through the most significant data structures, many algorithms, and programming tricks used in the kernel. Probing beyond the superficial features, the authors offer valuable insights to people who want to know how things really work inside their machine. Relevant segments of code are dissected and discussed line by line. The book covers more than just the functioning of the code, it explains the theoretical underpinnings for why Linux does things the way it does. The new edition of the book has been updated to cover version 2.4 of the kernel, which is quite different from version 2.2: the virtual memory system is entirely new, support for multiprocessor systems is improved, and whole new classes of hardware devices have been added. The authors explore each new feature in detail. Other topics in the book include:
|
Table des matières
Introduction | 1 |
Linux Versus Other UnixLike Kernels | 2 |
Hardware Dependency | 6 |
Linux Versions | 7 |
Basic Operating System Concepts | 8 |
An Overview of the Unix Filesystem | 12 |
An Overview of Unix Kernels | 18 |
Memory Addressing | 34 |
Delivering a Signal | 332 |
System Calls Related to Signal Handling | 343 |
Process Scheduling | 348 |
The Scheduling Algorithm | 352 |
System Calls Related to Scheduling | 367 |
The Virtual Filesystem | 372 |
VFS Data Structures | 378 |
File Objects | 385 |
Segmentation in Hardware | 35 |
Segmentation in Linux | 40 |
Paging in Hardware | 44 |
Paging in Linux | 54 |
Processes | 72 |
Process Descriptor | 74 |
Process Switch | 89 |
Creating Processes | 99 |
Destroying Processes | 106 |
Interrupts and Exceptions | 109 |
The Role of Interrupt Signals | 110 |
Interrupts and Exceptions | 111 |
Nested Execution of Exception and Interrupt Handlers | 121 |
Initializing the Interrupt Descriptor Table | 122 |
Exception Handling | 125 |
Interrupt Handling | 128 |
Softirqs Tasklets and Bottom Halves | 145 |
Returning from Interrupts and Exceptions | 156 |
Kernel Synchronization | 161 |
When Synchronization Is Not Necessary | 162 |
Synchronization Primitives | 163 |
Synchronizing Accesses to Kernel Data Structures | 184 |
Examples of Race Condition Prevention | 189 |
Timing Measurements | 193 |
Hardware Clocks | 194 |
The Linux Timekeeping Architecture | 197 |
CPUs Time Sharing | 202 |
Updating the Time and Date | 203 |
Updating System Statistics | 204 |
Software Timers | 206 |
System Calls Related to Timing Measurements | 213 |
Memory Management | 217 |
239 | |
Noncontiguous Memory Area Management | 256 |
Process Address Space | 263 |
The Processs Address Space | 264 |
The Memory Descriptor | 265 |
Memory Regions | 268 |
Page Fault Exception Handler | 285 |
Creating and Deleting a Process Address Space | 298 |
Managing the Heap | 300 |
System Calls | 303 |
System Call Handler and Service Routines | 304 |
Kernel Wrapper Routines | 316 |
Signals | 318 |
Generating a Signal | 327 |
Filesystem Types | 394 |
Pathname Lookup | 407 |
Implementations of VFS System Calls | 416 |
File Locking | 420 |
Managing IO Devices | 427 |
Device Files | 437 |
Device Drivers | 441 |
Block Device Drivers | 449 |
Character Device Drivers | 471 |
Disk Caches | 474 |
The Page Cache | 476 |
The Buffer Cache | 481 |
Accessing Files | 497 |
Memory Mapping | 513 |
Direct IO Transfers | 523 |
Swapping Methods for Freeing Memory | 528 |
What Is Swapping? | 529 |
Swap Area | 531 |
The Swap Cache | 545 |
Transferring Swap Pages | 548 |
Swapping Out Pages | 551 |
Swapping in Pages | 556 |
Reclaiming Page Frame | 559 |
The Ext2 and Ext3 Filesystems | 574 |
Ext2 Disk Data Structures | 577 |
Ext2 Memory Data Structures | 584 |
Creating the Ext2 Filesystem | 588 |
Ext2 Methods | 590 |
Managing Ext2 Disk Space | 592 |
The Ext3 Filesystem | 600 |
Process Communication | 632 |
Pipes | 633 |
FIFOs | 642 |
System VI PC | 644 |
Program Execution | 661 |
Executable Files | 662 |
Executable Formats | 674 |
Execution Domains | 676 |
The exec Functions | 678 |
System Startup | 685 |
Modules | 692 |
Source Code Structure | 702 |
Bibliography | 707 |
711 | |
749 | |