Linux kernel mid-term summary

Source: Internet
Author: User
Tags add time

First, how does the computer work?

1. Stored program Computer working model

1) von Neumann architecture

2) Stored program computer working model

3) What kind of instruction does the CPU recognize? How is it defined?

API: interface between programmer and computer.

ABI: Program and CPU interface

2, X86 Compilation Foundation

1) X86 CPU Registers

2) Common Assembly instructions

Http://www.cnblogs.com/20135132yoggie/p/5220003.html

Second, how the operating system is working

1. Function Call stack

1) Three magic Weapon How does a computer work? (summary)--Three magic weapons (stored program computer, function call stack, interrupt mechanism)

2) deep understanding of the function call stack

2, using the Linux kernel part of the source code simulation storage program computer work model and clock interrupt

3. Construct a simple operating system kernel on the basis of Mykernel

Http://www.cnblogs.com/20135132yoggie/p/5240418.html

Third, construct a simple Linux system menuos

1. Introduction to Linux kernel source code

Three magic weapons (stored program computer, function call stack, interrupt) and two swords (interrupt context Toggle: Save field and resume scene, process context toggle)

1) in the Linux kernel source code inside arch occupies quite a large amount. The code in the Arch/x86 directory is our focus.

2) kernel boot-related code is basically in the init directory (MAIN.C).

Start_kernel is the starting point for initializing the Linux kernel.

Start_kernel equivalent to the main function in a C program

3) Core code of the Linux kernel in the kernel directory

2. Construct a simple Linux system

Init is the first user-state process, which is process number 1th.

3. Track and debug the boot process of the Linux kernel

Http://www.cnblogs.com/20135132yoggie/p/5251382.html

Iv. three layers of skin (top) of the system call

1. User state, kernel state and interrupt

The library function encapsulates the system call.

1) What is the user state and the kernel state

2) differentiate between user and kernel state in Linux kernel code

Use CS(Code Snippet selector register) and EIP(offset register) to differentiate.

3) Interrupt processing is the primary way to enter the kernel state from the user state

2. Overview of System invocation

3, using the Library function API and C code embedded assembly code to trigger the same system call

Http://www.cnblogs.com/20135132yoggie/p/5279906.html

V. Three-layer skin with a system call (bottom)

1. Add time and Time-asm to Menuos

2. Call the kernel function using the GDB tracking system Sys_time

3, system calls in the kernel code working mechanism and initialization

1) Mechanism and initialization of system calls in kernel code

2) simplified System_call Pseudo-code for easy understanding

3) Simply browse the main code between System_call and Iret

Http://www.cnblogs.com/20135132yoggie/p/5312850.html

Vi. description of the process and creation of the process

1. Description of the process

1) Process descriptor TASK_STRUCT data structure (i)

The three main functions of the operating system: Process Management (CORE), memory management, file system.

2, the creation of the process

Http://www.cnblogs.com/20135132yoggie/p/5333026.html

Vii. Loading of executable programs

1. Preprocessing, compiling, linking, and format of the target file

1) How does the executable program come from?

2) format of the target file elf

3) statically linked elf executable file and process address space

2. Executable programs, shared libraries, and dynamic loading

1) Work before loading the executable program

2) dynamic link and runtime dynamic link application example when loading

3) Loading of executable programs

1. Analysis of key issues related to the loading of executable programs

Internal process of 2.sys_execve

3. Using GDB to track the processing of SYS_EXECVE kernel functions

4. Executable program loading and Zhuangsheng dream Butterfly Story

5. Analysis of dynamic linked executable program loading

Http://www.cnblogs.com/20135132yoggie/p/5363734.html

Viii. process switching and the general implementation process of the system

1, Process switch key code SWITCH_TO analysis

1) Timing analysis of progress and process scheduling

2) process context switch related code analysis

2, the general implementation process of Linux system

1) General execution process analysis of Linux system

2) Several special cases during the implementation of Linux system

3) Core and dancer

3. Overview of Linux system architecture and execution process

1) Linux Operating System Architecture overview

2) simplest and most complex operation--perform LS operation

3) Implementation of Linux systems from a CPU and memory perspective

Http://www.cnblogs.com/20135132yoggie/p/5389083.html

Summarize

Linux kernel Analysis of the net course of the end, these months, or harvest quite abundant, at least now some operations or some understanding, in the course of the experiment, although encountered a lot of problems, but still a one solved, using GDB debugging, set breakpoints and a series of operations. Understand how the computer works, what the operating system is, how the operating system works, the process of understanding system calls, the description and creation of processes, the loading of executable programs, the creation of processes, and so on. It is necessary to deepen understanding through continuous practice in future study.

Linux kernel mid-term summary

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.