Linux Kernel Analysis Learning experience

Source: Internet
Author: User

Li Yang Original Works reproduced please specify the source

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

In the blink of an eye a few weeks past, "The Linux kernel analysis" This course also sees to end, again these weeks of study, I on the original foundation deepened to the Linux system kernel understanding, for example many memory management, the process management knowledge, originally for I was only in the book The Thing, Through courses and experiments can be demonstrated through the actual code and the tracking of the running process.

These weeks of learning experience:

This study involves the Linux kernel scheduling mechanism, how the schedule works, the implementation of the system API, the creation of new process analysis, the execution of program loading and the implementation of the structure of the elf file, the online course mainly involves a kernel start ~ dispatch ~ operation of a process.

Based on the boot sequence of the x86 computer Linux system. The first step is that the BIOS imports the master boot record (MBR) from the boot device, then the code in the MBR looks at the partitioned table and reads the boot loader from the active partition, such as GRUB, Lilo, or Syslinux, after which the boot loader loads the compressed kernel image and passes control to it. Once the kernel has gained control, it will decompress itself and go into operation.

x86-based processors have two modes of operation: Real mode and protected mode. In real mode, the user can only use 1 MB of memory, and there is no protection. Protection mode is much more complex, and users can use more advanced features, such as paging. The CPU must switch the real mode to protected mode halfway. However, this switch is unidirectional, that is, you cannot switch back to real mode from protected mode.

The first step in kernel initialization is to execute the assembly code in real mode, followed by the Start_kernel () function in the Init/main.c file under protected mode. The Start_kernel () function First initializes the CPU subsystem, then the memory and process management systems are in place, then the external bus and I/O devices are started, and the final step is to activate the init (init) program, which is the parent process for all Linux processes. The initialization process executes a user space script that starts the necessary kernel services, and eventually derives the console terminal program and displays the login (login) prompt.

  

Here is a list of all the articles I studied in this course:

Brief analysis of computer working principle

Kernel working mechanism of Linux operating system--implementation of simple time slice rotation

Trace analysis of the boot process of the Linux system kernel

Embed assembly code system calls using Library function API and C code

Parsing the write interrupt processing process

Analyzing the process of creating a new process for the Linux system kernel

How the Linux kernel loads and launches an executable program

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

Summarize:

Through learning, I mastered more compilation and GDB debugging skills, I know how to build a Linux system, of course, it is possible to tamper with the system kernel, try to change ~ Subtract ~ Add kernel function.

Of course... By the way, the ability to write a blog has also been greatly improved ... This is a surprise, blogging really can be on the other hand to reflect their knowledge of the degree of mastery, but, really let me have high school when the Chinese teacher forced to write the feeling of Zhou Kee (that is the solution is to write a serial novel ...) )。

If you say so, I think the rich text of this course can be enriched, especially for the core code annotations. At the same time, the experimental design more emphasis and validation experiments, I hope to have more to let the students play their own things, such as a function, so that we combine the content of this section to achieve, or give the code framework, let everyone complete the assembly code and so on, I think this kind of brain to do, Would be more effective than validating the experiment.

  

Linux Kernel Analysis Learning experience

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.