| |
| |
Preface | |
| |
| |
| |
Introduction | |
| |
| |
Linux Versus Other Unix-Like Kernels | |
| |
| |
Hardware Dependency | |
| |
| |
Linux Versions | |
| |
| |
Basic Operating System Concepts | |
| |
| |
An Overview of the Unix Filesystem | |
| |
| |
An Overview of Unix Kernels | |
| |
| |
| |
Memory Addressing | |
| |
| |
Memory Addresses | |
| |
| |
Segmentation in Hardware | |
| |
| |
Segmentation in Linux | |
| |
| |
Paging in Hardware | |
| |
| |
Paging in Linux | |
| |
| |
| |
Processes | |
| |
| |
Processes, Lightweight Processes, and Threads | |
| |
| |
Process Descriptor | |
| |
| |
Process Switch | |
| |
| |
Creating Processes | |
| |
| |
Destroying Processes | |
| |
| |
| |
Interrupts and Exceptions | |
| |
| |
The Role of Interrupt Signals | |
| |
| |
Interrupts and Exceptions | |
| |
| |
Nested Execution of Exception and Interrupt Handlers | |
| |
| |
Initializing the Interrupt Descriptor Table | |
| |
| |
Exception Handling | |
| |
| |
Interrupt Handling | |
| |
| |
Softirqs and Tasklets | |
| |
| |
Work Queues | |
| |
| |
Returning from Interrupts and Exceptions | |
| |
| |
| |
Kernel Synchronization | |
| |
| |
How the Kernel Services Requests | |
| |
| |
Synchronization Primitives | |
| |
| |
Synchronizing Accesses to Kernel Data Structures | |
| |
| |
Examples of Race Condition Prevention | |
| |
| |
| |
Timing Measurements | |
| |
| |
Clock and Timer Circuits | |
| |
| |
The Linux Timekeeping Architecture | |
| |
| |
Updating the Time and Date | |
| |
| |
Updating System Statistics | |
| |
| |
Software Timers and Delay Functions | |
| |
| |
System Calls Related to Timing Measurements | |
| |
| |
| |
Process Scheduling | |
| |
| |
Scheduling Policy | |
| |
| |
The Scheduling Algorithm | |
| |
| |
Data Structures Used by the Scheduler | |
| |
| |
Functions Used by the Scheduler | |
| |
| |
Runqueue Balancing in Multiprocessor Systems | |
| |
| |
System Calls Related to Scheduling | |
| |
| |
| |
Memory Management | |
| |
| |
Page Frame Management | |
| |
| |
Memory Area Management | |
| |
| |
Noncontiguous Memory Area Management | |
| |
| |
| |
Process Address Space | |
| |
| |
The Process's Address Space | |
| |
| |
The Memory Descriptor | |
| |
| |
Memory Regions | |
| |
| |
Page Fault Exception Handler | |
| |
| |
Creating and Deleting a Process Address Space | |
| |
| |
Managing the Heap | |
| |
| |
| |
System Calls | |
| |
| |
POSIX APIs and System Calls | |
| |
| |
System Call Handler and Service Routines | |
| |
| |
Entering and Exiting a System Call | |
| |
| |
Parameter Passing | |
| |
| |
Kernel Wrapper Routines | |
| |
| |
| |
Signals | |
| |
| |
The Role of Signals | |
| |
| |
Generating a Signal | |
| |
| |
Delivering a Signal | |
| |
| |
System Calls Related to Signal Handling | |
| |
| |
| |
The Virtual Filesystem | |
| |
| |
The Role of the Virtual Filesystem (VFS) | |
| |
| |
VFS Data Structures | |
| |
| |
Filesystem Types | |
| |
| |
Filesystem Handling | |
| |
| |
Pathname Lookup | |
| |
| |
Implementations of VFS System Calls | |
| |
| |
File Locking | |
| |
| |
| |
I/O Architecture and Device Drivers | |
| |
| |
I/O Architecture | |
| |
| |
The Device Driver Model | |
| |
| |
Device Files | |
| |
| |
Device Drivers | |
| |
| |
Character Device Drivers | |
| |
| |
| |
Block Device Drivers | |
| |
| |
Block Devices Handling | |
| |
| |
The Generic Block Layer | |
| |
| |
The I/O Scheduler | |
| |
| |
Block Device Drivers | |
| |
| |
Opening a Block Device File | |
| |
| |
| |
The Page Cache | |
| |
| |
The Page Cache | |
| |
| |
Storing Blocks in the Page Cache | |
| |
| |
Writing Dirty Pages to Disk | |
| |
| |
The sync(), fsync(), and fdatasync() System Calls | |
| |
| |
| |
Accessing Files | |
| |
| |
Reading and Writing a File | |
| |
| |
Memory Mapping | |
| |
| |
Direct I/O Transfers | |
| |
| |
Asynchronous I/O | |
| |
| |
| |
Page Frame Reclaiming | |
| |
| |
The Page Frame Reclaiming Algorithm | |
| |
| |
Reverse Mapping | |
| |
| |
Implementing the PFRA | |
| |
| |
Swapping | |
| |
| |
| |
The Ext2 and Ext3 Filesystems | |
| |
| |
General Characteristics of Ext2 | |
| |
| |
Ext2 Disk Data Structures | |
| |
| |
Ext2 Memory Data Structures | |
| |
| |
Creating the Ext2 Filesystem | |
| |
| |
Ext2 Methods | |
| |
| |
Managing Ext2 Disk Space | |
| |
| |
The Ext3 Filesystem | |
| |
| |
| |
Process Communication | |
| |
| |
Pipes | |
| |
| |
FIFOs | |
| |
| |
System V IPC | |
| |
| |
POSIX Message Queues | |
| |
| |
| |
Program Execution | |
| |
| |
Executable Files | |
| |
| |
Executable Formats | |
| |
| |
Execution Domains | |
| |
| |
The exec Functions | |
| |
| |
| |
System Startup | |
| |
| |
| |
Modules | |
| |
| |
Bibliography | |
| |
| |
Source Code Index | |
| |
| |
Index | |