Understanding the Linux Kernel

כריכה קדמית
"O'Reilly Media, Inc.", 2002 - 765 עמודים

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:

  • Memory management including file buffering, process swapping, and Direct memory Access (DMA)
  • The Virtual Filesystem and the Second Extended Filesystem
  • Process creation and scheduling
  • Signals, interrupts, and the essential interfaces to device drivers
  • Timing
  • Synchronization in the kernel
  • Interprocess Communication (IPC)
  • Program execution
Understanding the Linux Kernel, Second Edition will acquaint you with all the inner workings of Linux, but is more than just an academic exercise. You'll learn what conditions bring out Linux's best performance, and you'll see how it meets the challenge of providing good system response during process scheduling, file access, and memory management in a wide variety of environments. If knowledge is power, then this book will help you make the most of your Linux system.
 

תוכן

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
Memory Area Management
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
Source Code Index
711
Index
749
זכויות יוצרים

מהדורות אחרות - הצג הכל

מונחים וביטויים נפוצים

מידע על המחבר (2002)

Marco Cesati received a degree in mathematics in 1992 and a Ph.D. in computer science (University of Rome, "La Sapienza") in 1995. He is now a research assistant in the computer science department of the School of Engineering (University of Rome, "Tor Vergata"). In the past, he served as system administrator and Unix programmer for the university (as a Ph.D. student) and for several institutions (as a consultant).

מידע ביבליוגרפי