Linux Kernel Learning Summary

Source: Internet
Author: User

Linux Kernel Learning Summary

20135224 Chen Shi + original works reproduced please specify the source + "Linux kernel analysis" MOOC course http://mooc.study.163.com/course/USTC-1000029000

The first part--Blog Summary:

How the computer Works pee

Http://www.cnblogs.com/chuishi/p/5209470.html

Operating system work pee

Http://www.cnblogs.com/chuishi/p/5246278.html

Trace analysis of the boot process of the Linux kernel

Http://www.cnblogs.com/chuishi/p/5269029.html

Summary of 2 system calls

Http://www.cnblogs.com/chuishi/p/5299057.html

Analyzing the System_call interrupt processing process

Http://www.cnblogs.com/chuishi/p/5322754.html

The process of creating a new process for the Linux kernel

Http://www.cnblogs.com/chuishi/p/5347436.html

How the Linux kernel loads and launches an executable program

Http://www.cnblogs.com/chuishi/p/5371649.html

The process of understanding process scheduling and process switching during the time-tracking analysis process

Http://www.cnblogs.com/chuishi/p/5400943.html

The second part--linux study Summary:

The first stage of operating system work : The process switches from the user state to the second phase of the kernel state: Interrupt processing Phase III: Process switching

The kernel boot process is: Daosh one (start_kernel....cpu_idle), Life Two (Kernel_init and Kthreadd), second birth three (i.e. front 0, 1 and 23 processes), Sansheng all Things (process 1th is the ancestor of all user-state processes, and process 2nd is the ancestor of all kernel threads)

procedure for system calls: Execute user program (e.g. fork)-system call number and execute int $0x80 generate interrupt--save_all--interrupt processing, call kernel function according to system call table--Execute kernel function--execute restore_ All and return to user mode

for the System_call function is to find the specific system call service routine path: system call number-system call Table sys_call_table--Soft interrupt instruction int 0x80--system call number put EAX register--system_ The call function reads the EAX register fetch, multiplies it by 4, generates an offset address, and then takes sys_call_table as the base address, with the base addresses added to the offset--the system invokes the service routine.

for a new process , the operating system creates a new process by replicating the parent process by calling Do_fork to implement----each newly created process dynamically assigns a task_struct structure

most of the steps for how Linux is loaded and started are: Working with the file beforehand---using the GCC tool to get the CPU to understand and execute the file format---can start a new incoming-call Sys_ via the Execve API EXECVE system calls, responsible for replacing new program code and data with new processes, opening executables, loading dependent library files, requesting new memory space---executing start_thread---Completing new process code and data substitution---returning---executing new process code.

process scheduling and process switching for understanding process scheduling time tracking analysis process, it can be summed up as follows: The process execution state of user requirement--intentional or system interrupt--save_all--Call Schedule ()--Execute to SWITCH_TO process context switch--another process enters and makes--restore_all-- iret--continue to run the user-state process summary:

Through this semester of continuous learning, in-depth understanding of the Linux kernel system this was once impossible myth has now been income bag, but unfortunately, some of the knowledge is not very good in the actual digestion and use, not to achieve their own compilation and modification of the height, of course, this is difficult to achieve in the short term, But in the future study and life will continue to improve and learn, and further improve the hands-on programming ability and not only limited to the understanding of objective knowledge, to achieve mastery. This semester through the teacher's unique teaching method really in a certain degree to mobilize the enthusiasm of the students, at the beginning of the semester, because of their various reasons did not be able to well understand this point, in the study of passive learning has not been able to keep pace, the teacher's words are true, today's fall, tomorrow will have to be mended back, Knowledge is accumulated, life is endless, learning, thank you teacher this semester's teachings, really benefited.

Linux Kernel Learning 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.