Deep analysis of Linux kernel source oss.org.cn/kernel-book/

Source: Internet
Author: User

This HTML page address: http://oss.org.cn/kernel-book/

In- depth analysis Linux Kernel source

Objective

Chapter I. into Linux

1.1 GNU and Linux growth

1.2 Linux development model and operation mechanism

1.3 into Linux Kernel

1.3.1 Features of the Linux kernel

1.3.2 changes to the Linux kernel version

1.4 Analyzing Linux the meaning of the kernel

1.4.1 Developing the right operating system for you

1.4.2 developing high-level software

1.4.3 helps in the teaching and research of computer science

1.5 Linux Kernel structure

1.5.1 the location of the Linux kernel throughout the operating system

1.5.2 The role of the Linux kernel

1.5.3 the abstract structure of the Linux kernel

1.6 Linux Kernel source code

1.6.1 + versions of kernel source code

1.6.2 The structure of the Linux kernel source code

1.6.3 where to start reading the source code

1.7 Linux Kernel source Code analysis tool

1.7.1 Linux hypertext cross-code search tool

1.7.2 The source code reading tool under the Windows platform source Insight

Chapter II Linux hardware Fundamentals of running

Register of 2.1 i386

2.1.1 Universal Register

2.1.2 Segment Register

2.1.3 Status and control register

2.1.4 System Address Register

2.1.5 Debug Register and test register

2.2 Memory address

2.3 segment mechanisms and descriptors

2.3.1 Segment Mechanism

The concept of the 2.3.2 descriptor

2.3.3 System Segment Descriptor

2.3.4 Descriptor Descriptor

2.3.5 Selector and Descriptor descriptor Register

2.3.6 Descriptor Projection Register

2.3.7 segments in Linux

2.4 Paging mechanism

2.4.1 Paging mechanism

2.4.2 Page Cache

2.5 The paging mechanism in Linux

2.5.1 page-related data structures and definitions of macros

2.5.2 the processing of page catalogs and page tables

2.6 Linux the assembly language in

Comparison of 2.6.1 and Intel assembly language

2.6.2 at/T assembly language related knowledge

2.6.3 GCC Embedded Assembly

2.6.4 Intel386 Assembly Instruction Summary

Chapter III Interruption mechanism

3.1 Interrupt Basic Knowledge

3.1.1 Interrupt Vector

3.1.2 Peripheral can mask interrupts

3.1.3 Abnormal and unshielded interrupts

3.1.4 Interrupt Descriptor Descriptor

3.1.5 Related assembly instructions

3.2 initialization of the interrupt descriptor Descriptor

3.2.1 setting of the external interrupt vector

3.2.2 Pre-initialization of the interrupt descriptor descriptor IDT

Final initialization of 3.2.3 interrupt vector table

3.3 Exception Handling

3.3.1 to save the register value in the kernel stack

3.3.2 initialization of the interrupt request queue

3.3.3 data structure of the interrupt request queue

3.4 Interrupt Handling

Hardware handling of 3.4.1 interrupts and exception handling

3.4.2 Linux handling of exceptions and interrupts

3.4.3 constants, data structures, and macros related to stacks

3.4.4 Execution of interrupt handlers

3.4.5 return from interrupt

3.5 the second half of the interrupt processing mechanism

3.5.1 Why the interruption is divided into two parts to deal with

3.5.2 Implementation Mechanism

Definition of 3.5.3 data structure

3.5.4 Soft Interrupt, BH, and Tasklet initialization

Execution of the latter part of the 3.5.5

3.5.6 to transplant BH to tasklet.

Fourth Chapter Process Description

4.1 Processes and programs (process and program)

Overview of processes in 4.2 Linux

4.3 task_struct structure Description

4.4 task_struct storage of the structure in memory

4.4.1 Process Kernel Stack

4.4.2 Current process (present macro)

4.5 how processes are organized

4.5.1 Hash Table

4.5.2 bidirectional loop Linked list

4.5.3 Run queue

4.5.4 Waiting Queue

4.6 Kernel Threads

4.7 Competence of the process

4.8 Kernel synchronization

4.8.1 Signal Volume

4.8.2 Atomic operation

4.8.3 spin Lock, read/write spin lock and large reader spin lock

4.9 Subsections of this chapter

Fifth Chapter process scheduling

5.1 Linux Time System

5.1.1 Clock Hardware

5.1.2 Clock operation mechanism

5.1.3 Linux Time Benchmark

5.1.4 Linux Time System

5.2 Clock Interrupt

5.2.1 Clock Interrupt Generation

5.2.2.Linux realization of the whole clock interrupt process

5.3 Linux Scheduler-schedule ()

5.3.1 Fundamentals

5.3.2 Linux Process scheduling timing

The basis of 5.3.3 process scheduling

Measurement of the operational degree of the 5.3.4 process

Implementation of 5.3.5 process scheduling

5.4 Process Switching

5.4.1 Hardware Support

5.4.2 Process Switching

Sixth Chapter Linux Memory Management

Memory management overview for 6.1 Linux

6.1.1 implementation structure of Linux virtual memory

6.1.2 kernel space and user space

6.1.3 The relationship between virtual memory implementation mechanism

6.2 Linux initialization of memory management

6.2.1 Enable paging mechanism

6.2.2 Detection of physical memory

6.2.3 Description of physical memory

Preliminary establishment of 6.2.4 page management mechanism

6.2. Establishment of 5-page table

6.2.6 Memory Admin Area

6.3 Allocation and recycling of memory

6.3.1 Partner algorithm

6.3.2 allocation and release of physical pages

6.3.3 Slab distribution mechanism

6.4 Address mapping mechanism

6.4.1 describing the data structure of a virtual space

6.4.2 The virtual space of the process

6.4.3 Memory Mapping

6.5 page mechanism

6.5.1-page fault generation

6.5.2-page Error positioning

Handling of fault pages in 6.5.3 process address space

6.5.4 Request Paging

6.5.5 Copy when writing

6.6 Switch System

Fundamentals of 6.6.1 Switching

6.6.2 Page Exchange Daemon KSWAPD

Data structure of 6.6.3 swap space

Application of 6.6.4 swap space

6.7 caching and refresh mechanisms

6.7.1 Cache used by Linux

6.7.2 Buffer Cache

6.7.3 translation Backup memory (TLB)

6.7.4 Refresh mechanism

6.8 creation and execution of processes

Creation of the 6.8.1 process

6.8.2 Program execution

6.8.3 execution function

Seventh Chapter Inter-process communication

7.1 Piping

Implementation mechanism of 7.1.1 Linux pipeline

Application of 7.1.2 Pipeline

7.1.3 Named pipes (FIFO)

7.2 Signal (signal)

7.2.1 Signal Types

7.2.2 Signal Mask

7.2.3 system Call

Implementation of 7.2.4 Typical system call

The relationship between 7.2.5 process and signal

7.2.6 Signal Example

IPC mechanism for 7.3 system V

7.3.1 Signal Volume

7.3.2 Message Queuing

7.3.3 Shared Memory

Eighth Chapter Virtual file system

8.1 Overview

Data structures in the 8.2 VFS

8.2.1 Super Block

8.2.2 The index node of the VFS

8.2.3 Catalog Item Object

8.2.4 the file structure associated with the process

8.2.5 the relationship between major data structures

8.2.6 data structures related to operations

8.3 Cache

8.3.1-Block cache

8.3.2 Index Node Cache

8.3.3 Directory Cache

8.4 registration, installation and disassembly of file systems

Registration of the 8.4.1 file system

Installation of the 8.4.2 file system

Uninstallation of the 8.4.3 file system

8.5 quota mechanism

8.6 Specific File system examples

8.6.1 Piping File System pipefs

8.6.2 Disk File System BFS

8.7 system calls to the file system

8.7.1 Open System call

8.7.2 Read system call

8.7.3 FCNTL system call

8. Porting of the 8 Linux2.4 file system

Nineth Chapter Ext2 File System

9.1 Basic Concepts

9.2 Ext2 the disk layout and data structure

9.2.1 EXT2 Disk Layout

9.2.2 Ext2 's Super block

9.2.3 Ext2 's Index node

9.2.4 Group Descriptor

9.2.5-bit diagram

9.2.6 index node table and example analysis

9.2.7 Ext2 's directory entry and document positioning

9.3 Access rights and security of files

9.4 Link Files

9.5 Assigning policies

9.5.1 Data Block Addressing

Holes in 9.5.2 files

9.5.3 Assigning a block of data

Tenth Chapter module mechanism

10.1 Overview

10.1.1 What is a module

10.1.2 Why should I use a module?

10.2 Implementation Mechanism

10.2.1 Data structure

Analysis of the realization mechanism of 10.2.2

10.3 Loading and unloading of modules

10.3.1 Implementation Mechanism

10.3.2 How to insert and unload modules

10.4 Kernel version

10.4.1 compatibility of kernel version with module version

10.4.2 changes from version 2.0 to 2.2 kernel API

10.4.3 porting kernel 2.2 to kernel 2.4

10.5 Writing kernel modules

10.5.1 Simple Kernel module writing

10.5.2 makefiles files for kernel modules

10.5.3 multiple files for kernel modules

11th Chapter device drivers

11.1 Overview

11.1.1 I/O software

11.1.2 device drivers

11.2 device-Driven fundamentals

11.2.1 I/O port

11.2.2 I/O interface and device controller

11.2.3 Device files

11.2.4 VFS handling of device files

11.2.5 Interrupt Handling

11.2.6 Drive DMA Operation

11.2.7 Mapping of I/O space

11.2.8 Device Driver Framework

11.3 Block device Drivers

11.3. Registration of 1 Block device drivers

11.3.2 Block device buffer-based data exchange

11.3. Several functions of the 3-block device driver

Implementation of 11.3.4 RAM disk driver

Implementation of 11.3.5 hard drive driver

11.4 Character device drivers

11.4.1 Simple character device driver

11.4. Registration of 2-character device drivers

11.4.31-Character Device driver instance

Compilation and loading of 11.4.4 drivers

12th Chapter & nbsp; Network

12.1  Overview

12.2  Network protocol

12.2.1  Network Reference Model

12.2.2 tcp/ip  Protocol working principle and data flow

12.2.3 internet  Protocol

12.2.4 TCP protocol

12.3  socket (socket)

12.3.1  socket in the network status and role

Type of 12.3.2  socket interface

How

12.3.3  sockets work

12.3.4 socket  Communication Process

12.3.5 socket for user-supplied system calls

12.4  Socket Buffer (sk_buff)

Features of the 12.4.1  socket buffer

12.4.2  Socket buffer Operation Fundamentals

Core content of the 12.4.3  sk_buff data structure

12.4.4  socket buffer provided functions

12.4.5  socket buffer upper support routines

12.5  Network Device Interface

12.5.1  Basic Structure

12.5.2  Naming conventions

12.5.3  Device Registration

12.5.4  Network device data structure

12.5.5  support functions

13th Chapter Start the system

13.1 Initialization Process

13.1.1 system power-on or reset

13.1.2 BIOS Boot

13.1.3 Boot Loader

13.1.4 initialization of the operating system

13.2 Initialized Tasks

Effect of 13.2.1 processor on initialization

13.2.2 the impact of other hardware devices on the processor

13.3 Linux the boot Loarder

Structure of the 13.3.1 floppy disk

13.3.2 the structure of the hard disk

13.3.3 Boot Loader

13.3.4 LILO

Running analysis of 13.3.5 Lilo

13.4 Enter the operating system

13.4.1 SETUP.S

13.4.2 Head.s

13.5 initialization in the MAIN.C

13.6 Set up init Process

Establishment of the 13.6.1 init process

13.6.2 startup of the required shell script files

Appendix:

1 Linux 2.4 Kernel API

2.1 Basic functions of the driver

2.2 Operation of two-way cyclic linked list

2.3 Basic C Library functions

2.4 Slab buffers in Linux memory management

2.5 The VFS in Linux

2.6 Networking for Linux

2.7 Network device Support

2.8 Module Support

2.9 Hardware Interface

2.10 Pieces of equipment

2.11 USB Device

2 references

Deep analysis of Linux kernel source oss.org.cn/kernel-book/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.