Linux kernel Analysis first-time learning report

Source: Internet
Author: User

Linux Kernel Analysis first study report student Bérénice Angremy Learning content 1. Stored program Computer working model

Von Neumann architecture: The core idea is to store the program computer. The CPU is abstracted as a for loop, always executing the next instruction, memory saving instruction and data, CPU to interpret and execute these instructions.

API: Application Programming Interface (interface between programmer and computer)

ABI: Binary interface, instruction encoding (programmer and CPU Interface)

2.x86 compilation

1. Registers

(1) General purpose register

(2) Segment Register:

(3) Flag Register

2. Assembly Instructions for Computers

(1) MOVL directive:

寄存器寻址,寄存器模式,以%开头的寄存器标示符。不和内存打交道,eax赋值给edx;立即寻址,把立即数直接放在寄存器,立即数是以$开头的数值;直接寻址,直接访问一个指定的内存地址的数据;间接寻址:将寄存器的值作为一个内存地址来访问内存;变址寻址:在间接寻址之时改变寄存器的数值。

(2) Other instruction stacks are growing downward, with a base address ebp pointing to the bottom of the stack stack

pushl 压栈,esp减4,把eax放入esp内存位置popl 出栈,从堆栈栈顶取32位放到寄存器eax里面,有两个动作:首先间接寻址,把栈顶数值放到eax里面,再把栈顶加4。call 函数调用,把当前的eip压栈,给eip赋新值;

Note: * Refers to these instructions are pseudo-instructions, the programmer can not directly modify these, that is, the EIP register can not be directly modified, can only be indirectly modified by special instructions.

Experimental report disassembly a simple C program

Assembly code

Experimental analysis

Learning Summary Experience

According to von Neumann principle, the computer is the storage and the program. In the teacher's explanation, the computer is a simple thing. Sequence of instructions for the program, these instructions and data, such as pre-stored in memory, when working, the CPU takes out the instruction from memory, extracts the data from the memory for the specified operation and logic operation, and then sends the result to the memory by the address. Then remove the next instruction to complete the operation until the stop is complete. I have learned the basics of Linux in the last semester. The teacher's net course content is clear also short, is suitable for the study. There will be better learning in the future.

Reference "Linux kernel Analysis" MOOC course http://mooc.study.163.com/course/USTC-1000029000

Linux kernel Analysis first-time learning report

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.