1st Edition
The Art of Linux Kernel Design Illustrating the Operating System Design Principle and Implementation
From Power-Up to the Main Function
Loading BIOS, Constructing Interrupt Vector Table, and Activating
Interrupt Service Routines in the Real Mode
Loading the OS Kernel and Preparing for the Protected Mode
Transfer to 32-bit Mode and Prepare for the Main Function
Summary
Device Initialization and Process 0 Activation
Set Root Device 2 and Hard Disk
Set Up Physical Memory Layout, Buffer Memory, Ramdisk, and Main Memory
Ramdisk Setup and Initialization
Initialization of the Memory Management Structure mem_map
Hooking the Interrupt Service Program
Initialize the Request Structure of the Block Device
Binding with the Interrupt Service Routine of Peripherals and Establishing the Human–Computer Interaction Interface
Time Setting
Initialize Process 0
Initialize the Buffer Management Structure
Initialize the Hard Disk
Initialize the Floppy Disk
Enable the Interrupt
Process 0 Moves from Privilege Level 0 to 3 and Becomes a Real Process
Creation and Execution of Process 1
Creation of Process 1
Kernel Schedules a Process for the First Time
Turn to Process 1 to Execute
Creation and Execution of Process 2
Open the Terminal Device File and Copy the File Handle
Fork Process 2 and Switch to Process 2 to Execute
The System Gets to the Idle State
File Operation
Install the File System
Opening a File
Reading a File
Creating a New File
Writing a File
Modifying a File
Closing a File
Deleting a File
The User Process and Memory Management
Linear Address Protection
Paging
When to Apply the Process to a New Page and When You Should Not
Map the New Application Page to the Linear Address in the Process
Complete Process of User Process from Creation to Exit
Multiple User Processes Run Concurrently
Buffer and Multiprocess Operating File
Function of Buffer
Structure of Buffer
The Function of b_dev, b_blocknr, and Request
Function of Uptodate and Dirt
Function of the Count, Lock, Wait, Request
Example 1: Process Waiting Queue of Buffer Block
Overall Look at the Buffer Block and the Request Item
Example 2: Comprehensive Examples of Multiprocess Operating File
Inter-Process Communication
Pipe Mechanism
Signal Mechanism
Summary
Operating System’s Design Guidelines
Run a Simple Program to See What the Operating System Has Done
Thoughts on the Design of the Operating System: Master-Slave
Mechanism
Three Key Techniques in Realizing the Master
Decisive Factor in Establishing the Master-Slave Mechanism: The Initiative
Relationship Between Software and Hardware: Host and Process, Peripherals and File
Parent and Child Processes Sharing Page
Operating System’s Global Interrupt and the Process’s Local Interrupt: Signal
Summary
Conclusion
Biography
Lixiang Yang is an associate professor of the University of Chinese Academy of Sciences. His research interests include operating systems, compilers, and programming language. Recently, he and his team successfully developed a new operating system that aims to fundamentally solve the problem concerning the intrusion of illegal programs into computers. They set up two websites for hackers to perform the intrusion attack test. These addresses are ftp://203.198.128.163/and ftp://114.242.35.6/.






