Synopses & Reviews
Have you ever wondered why is Linux so efficient? Are you trying to determine whether its performance will be good for some unusual application you have in mind? Have you ever tried to look at the kernel source code? If your answer to any of these questions is yes, this is the book for you.
Understanding the Linux Kernel hands you a guided tour to the Linux kernel and gives you many insights of great value and significance.
Linux is presented too often as a casual hacker experiment. But it has increasingly become not only a mission-critical part of many organizations, but a sophisticated display of programming skill. It incorporates many advanced operating system concepts and has proven itself extremely robust and efficient for a wide range of uses.
After reading this book, you will understand when Linux performs best and how it meets the challenge of different environments that assign varying importance to the system's responsiveness in process scheduling, file access, and memory management. The authors introduce each topic by explaining why it is important, and relate kernel operations to the system calls or utilities that are familiar to Unix programmers and users.
Major topics include:
* Memory management, including file buffering, process swapping, and DirectMemory Access (DMA)
* The Virtual File System and the Second Extended File System
* Process creation and scheduling
* Signals, interrupts, and the essential interfaces to device drivers
* Timing
* Synchronization in the kernel
* Inter-Process Communication (IPC)
* Program execution
Synopsis
Why is Linux so efficient? Is it the right operating system for a particular application? What can be learned from looking at the kernel source code? These are the kinds of questions that Understanding the Linux Kernel takes in stride in this guided tour of the code that forms the core of all Linux operating systems.
Linux is presented too often as a casual hacker experiment. It has increasingly become not only a mission-critical part of many organizations, but a sophisticated display of programming skill. It incorporates many advanced operating system concepts and has proven itself extremely robust and efficient for a wide range of uses.
Understanding the Linux Kernel helps readers understand how Linux performs best and how it meets the challenge of different environments. The authors introduce each topic by explaining its importance, and show how kernel operations relate to the utilities that are familiar to Unix programmers and users.
Major topics include: Memory management, including file buffering, process swapping, and Direct Memory Access (DMA) The Virtual File System and the Second Extended File System Process creation and scheduling Signals, interrupts, and the essential interfaces to device drivers Timing Synchronization in the kernel Inter-Process Communication (IPC) Program execution
Synopsis
"Understanding the Linux Kernel" helps readers understand how Linux performs best and how it meets the challenge of different environments. The authors introduce each topic by explaining its importance, and show how kernel operations relate to the utilities familiar to Unix programmers and users.
About the Author
Daniel P. Bovet got a Ph.D. in computer science at UCLA in 1968 and is now full Professor at the University of Rome, "Tor Vergata," Italy. He had to wait over 25 years before being able to teach an operating system course in a proper manner because of the lack of source code for modern, well-designed systems. Now, thanks to cheap PCs and to Linux, Marco and Dan are able to cover all the facets of an operating system from booting to tuning and are able to hand out tough, satisfying homework to their students. (These young guys working at home on their PCs are really spoiled; they never had to fight with punched cards.) In fact, Dan was so fascinated by the accomplishments of Linus Torvalds and his followers that he spent the last few years trying to unravel some of Linux's mysteries. It seemed natural, after all that work, to write a book about what he found.
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).
Table of Contents
Preface; The Audience for This Book; Organization of the Material; Overview of the Book; Background Information; Conventions in This Book; How to Contact Us; Acknowledgments; Chapter 1: Introduction; 1.1 Linux Versus Other Unix-Like Kernels; 1.2 Hardware Dependency; 1.3 Linux Versions; 1.4 Basic Operating System Concepts; 1.5 An Overview of the Unix Filesystem; 1.6 An Overview of Unix Kernels; Chapter 2: Memory Addressing; 2.1 Memory Addresses; 2.2 Segmentation in Hardware; 2.3 Segmentation in Linux; 2.4 Paging in Hardware; 2.5 Paging in Linux; 2.6 Anticipating Linux 2.4; Chapter 3: Processes; 3.1 Process Descriptor; 3.2 Process Switching; 3.3 Creating Processes; 3.4 Destroying Processes; 3.5 Anticipating Linux 2.4; Chapter 4: Interrupts and Exceptions; 4.1 The Role of Interrupt Signals; 4.2 Interrupts and Exceptions; 4.3 Nested Execution of Exception and Interrupt Handlers; 4.4 Initializing the Interrupt Descriptor Table; 4.5 Exception Handling; 4.6 Interrupt Handling; 4.7 Returning from Interrupts and Exceptions; 4.8 Anticipating Linux 2.4; Chapter 5: Timing Measurements; 5.1 Hardware Clocks; 5.2 The Timer Interrupt Handler; 5.3 PIT's Interrupt Service Routine; 5.4 The TIMER_BH Bottom Half Functions; 5.5 System Calls Related to Timing Measurements; 5.6 Anticipating Linux 2.4; Chapter 6: Memory Management; 6.1 Page Frame Management; 6.2 Memory Area Management; 6.3 Noncontiguous Memory Area Management; 6.4 Anticipating Linux 2.4; Chapter 7: Process Address Space; 7.1 The Process's Address Space; 7.2 The Memory Descriptor; 7.3 Memory Regions; 7.4 Page Fault Exception Handler; 7.5 Creating and Deleting a Process Address Space; 7.6 Managing the Heap; 7.7 Anticipating Linux 2.4; Chapter 8: System Calls; 8.1 POSIX APIs and System Calls; 8.2 System Call Handler and Service Routines; 8.3 Wrapper Routines; 8.4 Anticipating Linux 2.4; Chapter 9: Signals; 9.1 The Role of Signals; 9.2 Sending a Signal; 9.3 Receiving a Signal; 9.4 Real-Time Signals; 9.5 System Calls Related to Signal Handling; 9.6 Anticipating Linux 2.4; Chapter 10: Process Scheduling; 10.1 Scheduling Policy; 10.2 The Scheduling Algorithm; 10.3 System Calls Related to Scheduling; 10.4 Anticipating Linux 2.4; Chapter 11: Kernel Synchronization; 11.1 Kernel Control Paths; 11.2 Synchronization Techniques; 11.3 The SMP Architecture; 11.4 The Linux/SMP Kernel; 11.5 Anticipating Linux 2.4; Chapter 12: The Virtual Filesystem; 12.1 The Role of the VFS; 12.2 VFS Data Structures; 12.3 Filesystem Mounting; 12.4 Pathname Lookup; 12.5 Implementations of VFS System Calls; 12.6 File Locking; 12.7 Anticipating Linux 2.4; Chapter 13: Managing I/O Devices; 13.1 I/O Architecture; 13.2 Associating Files with I/O Devices; 13.3 Device Drivers; 13.4 Character Device Handling; 13.5 Block Device Handling; 13.6 Page I/O Operations; 13.7 Anticipating Linux 2.4; Chapter 14: Disk Caches; 14.1 The Buffer Cache; 14.2 The Page Cache; 14.3 Anticipating Linux 2.4; Chapter 15: Accessing Regular Files; 15.1 Reading and Writing a Regular File; 15.2 Memory Mapping; 15.3 Anticipating Linux 2.4; Chapter 16: Swapping: Methods for Freeing Memory; 16.1 What Is Swapping?; 16.2 Swap Area; 16.3 The Swap Cache; 16.4 Transferring Swap Pages; 16.5 Page Swap-Out; 16.6 Page Swap-In; 16.7 Freeing Page Frames; 16.8 Anticipating Linux 2.4; Chapter 17: The Ext2 Filesystem; 17.1 General Characteristics; 17.2 Disk Data Structures; 17.3 Memory Data Structures; 17.4 Creating the Filesystem; 17.5 Ext2 Methods; 17.6 Managing Disk Space; 17.7 Reading and Writing an Ext2 Regular File; 17.8 Anticipating Linux 2.4; Chapter 18: Process Communication; 18.1 Pipes; 18.2 FIFOs; 18.3 System V IPC; 18.4 Anticipating Linux 2.4; Chapter 19: Program Execution; 19.1 Executable Files; 19.2 Executable Formats; 19.3 Execution Domains; 19.4 The exec-like Functions; 19.5 Anticipating Linux 2.4; System Startup; Prehistoric