First chapter
1. Features of the Unix kernel
Concise: Provides only system calls and has a very clear design purpose
Abstract: Almost everything is treated as a file
Portability: Written in C, making it an amazing porting capability in front of a variety of hardware architectures
Process: Create quickly, perform a task at a time of quality and quantity; unique fork system call
Clear hierarchical structure: the concept of separation of strategy and mechanism, simple interprocess communication meta-language combines a single purpose program conveniently. All documents
2. Operating system and Kernel
Operating system: The part of the system that is responsible for the most basic functions and systems management.
Kernel: Interrupt Service Program in response to interrupt, manage multiple processes, share processor Time Scheduler, manage memory management program of process address space; network, interprocess communication
Kernel space: System State and protected memory space
System call: Application communicates with kernel
The activity of each processor at any given point in time must be summed up as:
Run in user space, execute user process
Runs in kernel space, is in the process context, executes on behalf of a particular process
Runs in kernel space, is in the interrupt context, is independent of any process, and handles a specific interrupt
II. Chapter II
1. Get the kernel source code
Using Git, the code looks like this:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Git pull # Updates branches to the newest branch of Linux
Installation: Tar xvjf linux-x.y.z.tar.bz2 or tar xvzf linux-x.y.z.tar.gz
If you use Git, you don't need to download a compressed file.
The/usr/src/linux directory should be guaranteed intact.
Patch: Patch-p1 <. /patch-x.y.z
2. Compiling the kernel
2.1 Configuring the Kernel
Command-line tools for character pages:? make config?
Graphical interface tool? Make Menuconfig?
2.2 Compiling kernel: Make
Make >: /detritus # redirected to this file.
Make >/dev/null # REDIRECT useless output information to a black hole with no return value.
2.3 Installing the new kernel
Make Modules_install
3. Synchronization and concurrency
Linux is a preemptive multitasking operating system
The Linux kernel supports symmetric multiprocessor systems (SMP)
Interrupt Asynchronous arrival
The Linux kernel can preempt
"Linux kernel design and implementation" read the first and second chapters of the Reading notes