Linux kernel (15)-Methodology

Source: Internet
Author: User

What is methodology

The first sense of the methodology is that it is a convoluted is a very hazy thing, obviously, learning itself is a very iffy thing, some people all day Sasa do not see how attentively can get very good results, and some people on the contrary, cast cantilever cone biting also is the result mediocre harvest. The reason for a large part of this is the methodology.

Of course, because everyone's situation is not the same, there is no such a standard methodology exists, so it is easy to say that it is a big flicker. Just like Mr. Ren Zhiqiang, who had been throwing his shoes at the audience because he was so much like a fool when he was doing a house-selling methodology speech.

So what is methodology? Many people should be very natural to answer the methodology is the method, which is also true, then why use the word methodology here, not I have to be here to make a mistake, this is to blame Descartes in 17th century one day, idle extremely bored write such a book, the title is called "Methodology", In this book, which most people do not know, the method is raised to the height of the theory, so there is the methodology.

This book has affected a generation after generation, such as today's Fengjie, if one day Feng elder sister out of memoirs, we go to study her brilliant fame road, will find that the methodology for her and the team behind her great influence. So the methodology is important for accomplishing one thing, and so is learning about our kernel.

Descartes in his book, the methodology, that is, the method of research problems into a simple sentence, that is, "complex problems to simplify." This means that complex problems should be broken down into a number of simple small problems, separated by a separate solution. This sentence of course can learn from the application to the kernel, but need to make some changes, not broken down into a number of simple small problems, but the kernel learning such a complex thing divided into from low to high many different levels, each level has its own needs to achieve the goals and requirements. This is also my own thought of the kernel learning methodology, that is, the method of understanding the kernel.

Understanding the Kernel: fundamentals of the kernel

It's best to think of it as a living body, not just a bunch of lifeless code. Specifically, when we learn and browse the implementation of the kernel, we can see it as a real-world mapping. The kernel is written by people in the real world, so whether intentionally or unintentionally, will inevitably contain some of their own real feelings, we can understand the kernel of this context, this hidden in the code behind the philosophy. For example, we can think that the kernel is a big world, a process is a life in this world, process management and scheduling is the power of the Big World, memory is the process of the home, the core of the goal is to make every process of the house has its home.

Since the kernel is supposed to be a living individual, the first thing we know about it is to know some basic information about it, just as we know each other first and foremost through personal basic information.

First from the name, kernel in the dictionary there are two main definitions, one is "soft, a nut edible part", for Linux kernel, of course, the second definition: "The core part of something." So broadly speaking, Linux kernel is the most central part of the Linux operating system, and in the narrow sense, it is just Linus that group of people wrote that bit of code.

Of course, the craved code is quite complex, just from the amount of code, has already broken through the tens. Structurally speaking, it is not long before a person is poor enough to be able to understand all of their own power. Therefore, learn the kernel should not seek big perfection, choose a little research enough depth is not easy.

Then is the age of kernel, kernel is not a Huaichun maiden, so its age does not need secrecy, from the birth of 1991, in the last year, just held its own adult ritual, entered a mature development period.

Just as we have our own adolescence, middle-aged, and so on, kernel corresponding also has a lot of different version number, but the difference is that our adolescence is no longer return, kernel different version number is co-existence.

For many years, the kernel version has been allocated in the form of x.y.z 3 numbers, the middle even Y represents the stable version, and the odd y represents the unstable development version. The so-called stable version refers to the kernel features are fixed, the code is stable and reliable, no additional features, to improve is only to modify the code errors. The unstable version refers to the addition of new features to the previous stable version, which is still in development and the code is not running reliably.

For now, the release of the 2.6 kernel has been going on for a long time, so when will the 2.7 be released? Linus my answer is that there will not be 2.7, he will not follow the old model, the new model will be better, not worth repeating the past. He said he was considering a new numbering method, a time-based version number. For example, replace 2.6.26 with 2008.7, the second number in the middle represents the year, 2008 is 2.8, the first version in 2009 is 2.9.1, then 2010 is 3.0, and so on.

Finally I have to mention that the dazzling distribution, the kernel and the distribution of the relationship between the same kind of twins, mutual dependence on each other to support and grow together. Without those distributions, the kernel can only be on the shelf of a seemingly good-looking toys, and can not really walk into our work and life, without the kernel, those distribution is missing the foundation of existence, it can only be a tofu slag project. So before you learn the kernel, you will use Linux, and you cannot belittle the use of a release version.

Understanding the kernel: the connotation of the kernel

After you know the appearance of the kernel, you need to know the kernel's connotation, that is, the kernel architecture.

First look at the first diagram, which conveys the message to us that the kernel separates the application from the hardware. The kernel is responsible for interacting with computer hardware, implementing hardware control, scheduling access to hardware resources, and providing a high-level execution environment for user applications and virtual interfaces for accessing hardware.

Hardware compatibility is one of the core design goals, and almost all of the hardware, as long as it is not customized for other operating systems, can be supported by Linux.

Related to hardware compatibility is portability, which is the ability to run Linux on different hardware platforms. This breadth of platform support has been successful, in part because the kernel is clearly partitioned for both system-related and system-independent parts, from the Intel X86 architecture that initially supported only the standard IBM compatible machine to the ability to support almost all hardware platforms such as ARM, MIPS, PowerPC, and so on. So there is the second picture.

The system-independent sections typically define interfaces to the relevant parts of the system, so that the process of porting the kernel to the new architecture becomes the process of confirming the characteristics of those interfaces and implementing them.

At the same time, the connection between the user application and the kernel is usually implemented through the standard C library, which is the middle tier of the kernel, and the standard C library function itself is based on the system invocation provided by the kernel. The user application and some cores are portable through the standard C library and the interface to the system-dependent parts of the kernel system.

So the third picture is more accurate. Among them, the process management part realizes the abstraction of a process world, this process world is similar to our human world, but the individual in our world is human, and in the process world is a process, our people and people through correspondence, mobile phone, network and other traffic, And between processes is a different way of interprocess communication, and we all share the same planet, and all processes share one or more CPUs.

In the world of this process, memory is one of the important resources, just like our land. Therefore, the policy and method of managing memory, that is, memory management is a key factor to determine the performance of the system.

Linux kernel (15)-Methodology

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.