Book description
Uses the Running Operation as the Main Thread
Difficulty in understanding an operating system (OS) lies not in the technical aspects, but in the complex relationships inside the operating systems. The Art of Linux Kernel Design: Illustrating the Operating System Design Principle and Implementation addresses this complexity. Written from the perspective of the designer of an operating system, this book tackles important issues and practical problems on how to understand an operating system completely and systematically. It removes the mystery, revealing operating system design guidelines, explaining the BIOS code directly related to the operating system, and simplifying the relationships and guiding ideology behind it all.
Based on the Source Code of a Real Multi-Process Operating System
Using the 0.11 edition source code as a representation of the Linux basic design, the book illustrates the real states of an operating system in actual operations. It provides a complete, systematic analysis of the operating system source code, as well as a direct and complete understanding of the real operating system run-time structure. The author includes run-time memory structure diagrams, and an accompanying essay to help readers grasp the dynamics behind Linux and similar software systems.
- Identifies through diagrams the location of the key operating system data structures that lie in the memory
- Indicates through diagrams the current operating status information which helps users understand the interrupt state, and left time slice of processes
- Examines the relationship between process and memory, memory and file, file and process, and the kernel
- Explores the essential association, preparation, and transition, which is the vital part of operating system
Develop a System of Your Own
This text offers an in-depth study on mastering the operating system, and provides an important prerequisite for designing a whole new operating system.
Table of contents
- Cover Page
- Title Page
- Copyright Page
- Preface
- Author
- Chapter 1: From Power-Up to the Main Function
-
Chapter 2: Device Initialization and Process 0 Activation
- 2.1 Set Root Device 2 and Hard Disk
- 2.2 Set Up Physical Memory Layout, Buffer Memory, Ramdisk, and Main Memory
- 2.3 Ramdisk Setup and Initialization
- 2.4 Initialization of the Memory Management Structure mem_map
- 2.5 Binding the Interrupt Service Routine
- 2.6 Initialize the Request Structure of the Block Device
- 2.7 Binding with the Interrupt Service Routine of Peripherals and Establishing the Human–Computer Interaction Interface
- 2.8 Time Setting
- 2.9 Initialize Process 0
- 2.10 Initialize the Buffer Management Structure
- 2.11 Initialize the Hard Disk
- 2.12 Initialize the Floppy Disk
- 2.13 Enable the Interrupt
- 2.14 Process 0 Moves from Privilege Level 0 to 3 and Becomes a Real Process
-
Chapter 3: Creation and Execution of Process 1
-
3.1 Creation of Process 1
- 3.1.1 Preparation for Creating Process 1
- 3.1.2 Apply for an Idle Position and a Process Number for Process 1
- 3.1.3 Call Copy_process()
- 3.1.4 Set the Page Management of Process 1
- 3.1.5 Process 1 Shares Files of Process 0
- 3.1.6 Set the Table Item in the GDT of Process 1
- 3.1.7 Process 1 Is in Ready State to Complete the Creation of Process 1
- 3.2 Kernel Schedules a Process for the First Time
-
3.3 Turn to Process 1 to Execute
-
3.3.1 Preparing to Install the Hard Disk File System by Process 1
- 3.3.1.1 Process 1 Set hd_info of Hard Disk
- 3.3.1.2 Read the Hard Disk Boot Blocks to the Buffer
- 3.3.1.3 Bind the Buffer Block with Request
- 3.3.1.4 Read the Hard Disk
- 3.3.1.5 Wait for Hard Disk Reading Data, Process Scheduling, and Switch to Process 0 to Execute
- 3.3.1.6 Hard Disk Interruption Occurs during the Execution of Process 0
- 3.3.1.7 After Reading the Disk, Switch Process Scheduling to Process 1
- 3.3.2 Process 1 Formats the Ramdisk and Replaces the Root Device as the Ramdisk
- 3.3.3 Process 1 Loads the Root File System into the Root Device
-
3.3.1 Preparing to Install the Hard Disk File System by Process 1
-
3.1 Creation of Process 1
-
Chapter 4: Creation and Execution of Process 2
-
4.1 Open the Terminal Device File and Copy the File Handle
-
4.1.1 Open the Standard Input Device File
- 4.1.1.1 File_table[0] is Mounted to Filp[0] in Process 1
- 4.1.1.2 Determine the Starting Point of Absolute Path
- 4.1.1.3 Acquiring the i node of Dev
- 4.1.1.4 Determine the i node of Dev as the Topmost i node
- 4.1.1.5 Acquire the i node of the tty0 File
- 4.1.1.6 Determine tty0 as the Character Device File
- 4.1.1.7 Set file_table[0]
- 4.1.2 Open the Standard Output and Standard Error Output Device File
-
4.1.1 Open the Standard Input Device File
- 4.2 Fork Process 2 and Switch to Process 2 to Execute
- 4.3 Load the Shell Program
- 4.4 The System Gets to the Idle State
-
4.1 Open the Terminal Device File and Copy the File Handle
- Chapter 5: File Operation
- Chapter 6: The User Process and Memory Management
-
Chapter 7: Buffer and Multiprocess File
- 7.1 Function of Buffer
- 7.2 Structure of Buffer
- 7.3 The Function of b_dev, b_blocknr, and Request
- 7.4 Function of Uptodate and Dirt
- 7.5 Function of the Count, Lock, Wait, Request
- 7.6 Example 1: Process Waiting Queue of Buffer Block
- 7.7 Overall Look at the Buffer Block and the Request Item
- 7.8 Example 2: Comprehensive Examples of Multiprocess Operating File
- Chapter 8: Inter-Process Communication
-
Chapter 9: Operating System’s Design Guidelines
- 9.1 Run a Simple Program to See What the Operating System Has Done
- 9.2 Thoughts on the Design of the Operating System: Master–Slave Mechanism
- 9.3 Three Key Techniques in Realizing the Master–Slave Mechanism
- 9.4 Decisive Factor in Establishing the Master–Slave Mechanism: The Initiative
- 9.5 Relationship between Software and Hardware
- 9.6 Parent and Child Processes Sharing Page
- 9.7 Operating System’s Global Interrupt and the Process’s Local Interrupt: Signal
- 9.8 Summary
- Conclusion
Product information
- Title: The Art of Linux Kernel Design
- Author(s):
- Release date: April 2014
- Publisher(s): Auerbach Publications
- ISBN: 9781466518049
You might also like
book
Understanding the Linux Kernel, 3rd Edition
In order to thoroughly understand what makes Linux tick and why it works so well on …
book
Understanding the Linux Kernel, Second Edition
To thoroughly understand what makes Linux tick and why it's so efficient, you need to delve …
book
The Linux Programming Interface
The Linux Programming Interface is the definitive guide to the Linux and UNIX programming interface—the interface …
book
Learning Modern Linux
If you use Linux in development or operations and need a structured approach to help you …