Ordo, touch the category bypass [Methodology of kernel learning]

xiaoxiao2021-03-06  14

I. Study the purpose of the kernel

To do things, just right. To talk about the study of the core and exchange experience, the premise must have an appropriate and accurate purpose, and can harvest well.

Many people have such a doubt, why should I study the kernel? We are not kernel developers (perhaps you will become Linus assistants in the future :-). This is poor, well known, Linux contains two levels of meaning, one is the kernel, the second is the release version, the former is the core essence, the latter is the application plan, both are not ruined. The frontier is slightly behind, thinking is not learning; the slightly, the latter is not thinking.

Learning is a step-by-step, we learn Linux, first contact is the distribution version of each characteristic, easy and easy to get started, and gradually have a preliminary understanding of the Linux framework in the process of learning, it is to understand Linux world. Game rules. While your own ability is improved, you will find that the rate of progress seems to fall, why? That's because you open it is just your own memory instead of intelligence, the rules of the game are the core high-level packaging. It gives users and even programmers' interfaces are friendly (I believe many people are inhaused by UNIX), and this The interface has become very mature, and I just need to know. For example, the biggest difference between the release is the respective FHS (file directory framework) and package management mechanism, such as Gentoo's Portage (Port tree), and Emerge, as long as Debian's APT-GET, users as long as it is In this second, you can get a bundle in the world of this release, but the way is the same, that is, the identity rules. When you have been cooked for these rules, you will find that you are just from the user's angle, not from the developer's perspective, the difference is whether you have innovative in the Linux world.

Compared to the Linux open source community at home and abroad, it is not difficult to find that our level is still very low, and many innovations are all occupied by foreign open source communities. We can only follow, in passive situation. Still illustrative, such as you are a LFS enthusiast, beginners act according to the LFS document, and the old birds, refer to LFS Hints to transform their own systems, but, I don't know, this is all non-nations. LFS documents are developed by foreigners, and LFS Hints is also written by foreigners. It is not that we should not introduce technology, but we see that we have lack innovation; such as UDEVs adopted in the new kernel (everyone should not be unfamiliar), it is just a logical I / O layer rule, but It is DEVFS to evolution, and everyone will learn with the open source community. Why can foreigners think about innovative UDEV? In the final analysis, that is, we don't pay attention to the most underlying research, based on the problem of high-level packaging, what is the use of Microsoft toy software? We always talk about our own release, but have you thought about it, not only putting ready-made kernels, but if this is the case, Redhat will not be the most popular version of the world. One (Redhat has a seat in most projects in Open Source Community, and every innovative technology launches new version of the new version, the innovative NPTL thread library is a good example).

It can be seen, based on the nuclear look, the purpose is 2: 1. Learn a ten, grasp the initiative of innovation 2. Knowing that there is a matter of understanding, from the deep understanding of Linux, so that the release version of the daily operation can touch bypass, The pair of swearing is two. Study the realm of the kernel

-->

Practice->

Develop

Nowadays the realm of the Chinese people study the kernel is mostly

Read (including myself :-), and our final realm is development, which is one of the developers of the kernel, so that China's Linux business is independent!

3. Study the attitude of the kernel

The Linux kernel has developed more than ten years. The system becomes very large. It can be said that the root is confused. We read it. It is often difficult to directly master the overall situation, combined with our actual situation, it is best to use the Linux release version from everyday, encounter To some very wonderful questions, it should combine it to study the related items of the kernel, touch the class bypass. For example, when you play the problem of Kernel PANIC, we should find that there is such a sentence in the init / main.c, and then find the solution, and finally discover the necessary file system modules. It is necessary to compile the kernel (self-furniture contradiction), and, for example, we must transform the runtime script of the release version, you should notice that some scripts are running in kernel (such as LinuxRC), most scripts are running in the user (RCX.D), understanding the big direction, it is well encoded.

Guerrilla Sanda, gradually surrounded by the big center

Of course, kernel research has to have a good tool assistant, and there must be information (standing on the shoulders of the giant, seeing more)

Ordain, touch the class

转载请注明原文地址:https://www.9cbs.com/read-47832.html

New Post(0)