Linux Kernel Learning Summary

Source: Internet
Author: User

Jiang

id:fuchen1994

I. Simple understanding of Linux systems

The Linux operating system is much smaller and less complex than Windows. There are similarities and differences between the two. For example, both have kernel state, user state, system call, process basic operating system concept and implementation. However, in some specific implementations, the architecture is very different, such as the implementation of the file system is a big difference, but I prefer the Linux virtual file system, better compatibility.

After studying this course, my first feeling is: Wow! The original implementation of our operating system is this, the logic is very complex but not as magical as imagined. After finishing this course, the cognition of the operating system in my mind becomes clear from the blur, and the user angle becomes the developer angle.

The implementation of the Linux operating system is as follows, the first is the motherboard's BIOS system to start the assembly of the operating system, and then the assembler began to prepare for the kernel's operating environment, and then start_kernel this place into the operating system kernel, the first process was manually created by the assembler, For process No. 0, no process on the CPU will run until it is run, until process 1th is created, it is the ancestor of all processes, and then the 2nd process, which is the ancestor of all threads. Process is the core of the system implementation, most of the operation of the Linux operating system is the operation of the process, such as process scheduling, switching, and so on, understand the process, understand the majority of kernel code. A thread is a smaller running carrier of a process, typically running inside a process, equivalent to a smaller child process that can execute concurrently and improve execution efficiency.

System call is the only way to enter the kernel state from the user state, the system call is not difficult to understand, the concept is simple but very practical. The user state triggers an interrupt or an exception, then enters the kernel state through the system call, then executes the processing by the kernel State, completing the user request or error handling. This corresponds to the user state to the kernel state of a network cable, input problems, output results, can avoid the interference of the kernel state, and the emergence of a variety of wonderful errors.

The process creation of the Linux operating system is implemented by the fork () function, the parent process in the operating system creates a child process by copying, and the PID of the child process is returned in the parent process, then after a time slice, after the CPU runs on the child process, the subprocess pid=0, and the two processes are independent of each other. The operating system completes the creation of the new process.

Process scheduling and switching when the Linux kernel is a difficult part, I understand not good, ready to find a book to read again. Process scheduling needs to meet one of the following situations, interrupt or exception, kernel thread active scheduling, the user state process into the kernel state. This enables multi-tasking operations.

The operating system is an onion, layer by layer, the previous layer relies on the next layer of services provided, layer by package, leaving only one channel and this channel can not affect the next layer of the original code. So as to provide users with an efficient and secure operating system. In fact, layers of packaging appear in all aspects of the computer, such as CPU, storage devices and other hardware production.

Two. Linux Kernel Analysis Course learning experience

Learning This course must first have a computer composition, assembly, operating system, C and other basic knowledge, if not available, learning will be very laborious, and the effect is general. I am learning this course, parallel learning is the operating system class, but the Linux kernel analysis learning than the operating system at least 2 months earlier, so many concepts do not understand when learning, but after learning the operating system after class is more clear, so the pre-curriculum is best to learn in advance.

I am not a computer major student, is a tourism management major. The school is only two, in Anhui, the name is insignificant. I am interested in computers and want to work in related industries. However, due to the lack of professional computer science training, so began to take MOOC courses. If I only wanted to be a yard farmer, I wouldn't have to. I would like to prove that can be achieved through the MOOC course of study in 2 years of time to achieve the level of computer undergraduate students graduated or even higher. I hope this challenge can be completed, even if I do not work in the computer industry, but also hope that this learning experience can bring me good memories.

This course should be streamlined, feel only about the first half of the Linux kernel, there are more difficult to talk about later, it may be the cause of MOOC, it may be left to us to learn, to explore, I personally would like to be the latter. Therefore, the proposal to see the text of the students after this course, but also need to find more information to learn the latter part of the study, I am ready to re-learn the video after the next part of the study, if the teacher can provide the guidance behind the study will be greatly appreciated!

The process of learning is the process of continuous practice, this course has no programming aspects of the work, all logic analysis. So the teacher asked us to write a blog, our experience in writing, so as to deepen our understanding, this aspect is very good, I will also be in this course after the completion of the writing of my blog. So it is recommended that later students, must remember after the class after the homework, this can let you take a week of the course has a great comb, deepen understanding.

Three. links to my Blog

1.Linux Kernel Analysis--disassembly of a simple C program (AT/t assembly)

http://www.jianshu.com/p/5cbf174fd263

2.Linux Kernel Analysis--Implement a simple system kernel

Http://www.cnblogs.com/fuchen1994/p/5247228.html

3.Linux Kernel analysis-boot from Start_kernel to init process using GDB trace debug kernel

Http://www.cnblogs.com/fuchen1994/p/5272705.html

4.Linux Kernel Analysis--using the same system call using the Library function API and the embed assembly code in C code two ways

Http://www.cnblogs.com/fuchen1994/p/5294562.html

5.Linux Kernel Analysis-Analyze system_call interrupt processing process

Http://www.cnblogs.com/fuchen1994/p/5325876.html

6.Linux Kernel Analysis-analyzing the process of creating a new process for the Linux kernel

Http://www.cnblogs.com/fuchen1994/p/5350357.html

7.Linux Kernel Analysis-linux How the kernel loads and starts an executable program

Http://www.cnblogs.com/fuchen1994/p/5375658.html

8.Linux Kernel Analysis-The process of understanding the timing of process scheduling, tracking and analyzing process scheduling and process switching

Http://www.cnblogs.com/fuchen1994/p/5400967.html

Four. Harvest and regret

Harvest or more, through the course of learning, I mastered the Linux kernel analysis methods, analysis tools, understand a small portion of the Linux kernel code, for the future of the Linux kernel deeper learning lay the foundation.

Regret is not first learn the operating system courses, but first learned the course, after all, I am a junior, and immediately to internship, this course may not be able to catch up with the next class, so only with the operating system, after the course I will see more, especially in the operating system after the course to learn again this course.

Thanks to Monensin and the Chinese University of Science and Technology for providing us with such a high-quality curriculum, we are very grateful for the poor school students to have access to quality courses and excellent teachers.

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.