标签:
1. Computer System Review
To begin with, we should have a refresher on the skeleton of a computer system, especially the Operating System:
2. Overview of Linux Kernel
What we learn here is Linux 0.11, which is a modular, UNIX-like, monolithic kernel. The major tasks of a kernel includes Process Management, Memory Management, Device Management, supporting System Calls and so forth.
The following picture is the layout of Linux Source Tree:
3. Booting Procedure
When the computer is tuned on, CPU will jump to memory 0xFFFF0 (the address of BIOS), and run a Power-On Self Test (POST) of BIOS. After that, once a bootale device is found, BIOS will extract the Master Boot Record (MBR) from the first sector (512B) of the hard disk into memory 0x7C00, and then transfer control to the boot loader, the first 446B of the MBR followed by the Partition Table.
GNU GRUB is an operating system independent boot loader.The 1st stage of GRUB boot process lies within MBR, and its task is just to load GRUB stage 1.5, which immediately follows MBR and contains file sytem drivers. Then GRUB stage 2 will be loaded by stage 1.5, and will display boot menu to the user. Finally, GRUB will load the user-selected (or default) kernel into memory and pass on control to the kernel.
Once the kernel has finished all the initialization, it will create the init process (pid = 1), which is the root of all processes running on Linux. The init process will start various processes according to the run-level, and typically create instances of "getty" to spawn user‘s shell process. Besides creating more processes, another task of the init process lies in the system shutdown.
Linux Kernel: Introduction and Booting
标签:
原文地址:http://www.cnblogs.com/DevinZ/p/4433693.html