[Concept Interpretation] Kernel

xiaoxiao2021-03-06  38

Kernel

Wikipedia, the free encyclopedia.

In computer science, the kernel is the most basic part of the operating system. It is a part of software for security access to computer hardware for many applications, and this access is limited, and the kernel determines how long the hardware operation is for a certain part of the hardware operation. Direct to hardware operations is very complicated, so the kernel usually provides a hardware abstraction method to complete these operations. Hardware abstraction hides complexity, providing application software and hardware with a simple, unified interface, making programming easier.

Strictly speaking, the kernel is not the components necessary in the computer system. The program can be directly transferred to the computer, such design descriptions do not want to provide support for any hardware abstraction and operating system, which is common in the design of the early computer system. Finally, some auxiliary procedures, such as program loaders and debuggers, are designed to machine core, or cured in read-only memory. When these changes occurs, the concept of operating the system kernel is gradually clarified.

The kernel can be divided into four categories:

Single core provides a lot of complete hardware abstract operations for potential hardware. The micro-kernel only provides a small part of hardware abstraction, most of which is done by a special user program: server. The mixing kernel is very similar to the microconuclear structure, but its components are more running in the core state to achieve faster execution speed. The outer core This kernel does not provide any hardware abstraction, but allows the additional run library to be added to the kernel, and the hardware can be directly or proximate to the hardware through these runtime applications.

Single core

The single core structure defines a high-order abstract interface on the hardware, applying a group of primitives (or system calls) to implement the function of the operating system, such as process management, file system, and storage management, etc., these functions Multiple modules running in the core state are completed.

Although each module serves these operations separately, the kernel code is highly integrated, and it is difficult to write correct. Because all modules are running on the same kernel space, a small bug will make the entire system crash. However, if the development is smooth, the single core structure can be beneficial from the operational efficiency.

Many modern single-core structure cores, such as Linux and FreeBSD kernels, which can be transferred to execute when running, which makes the ability to expand the kernel easier, or make the core part of the kernel becomes more concise.

Example of a single core structure:

Traditional UNIX kernel, such as the version of the University of Berkeley issued Linux kernel

Micronary

The micro-nuclear structure consists of a very simple hardware abstraction layer and a comparison key primitive or system call. These primitives only include several components necessary to establish a system, such as thread management, address space, and inter-process communication. .

The goal of the micronucleus is to separate the implementation of the system service and the basic operation rules of the system. For example, the input / output lock service of the process can be provided by a service component running outside the micronucleus. These very modular user-state servers are used to complete the more advanced operation in the operating system, so that the design of the core part of the core is simpler. The failure of a service component does not cause crash of the entire system, the kernel needs to do, just restarting this component without having to affect other parts.

Example of the micro-kernel structure:

AIX Beos L4 Microcaround Series Mach, for GNU Hurd and Mac OS X Minix Morphos QNX Radios VSTA

Single nuclear VS. microner

Single core structure is a very attractive design that is more efficient than the complexity of system control code that implements all low-level operations on the same address space.

In the early 1990s, the single core structure was considered to be outdated. Designed Linux into a single core structure rather than a numerous controversy (see: Elevation: Linus Torvalds and Andrew Torvalds and Andrew Tannbaum (http://www.dina.dk/~abraham/linus_vs_tanenbaum.html ))). Now, the monocon structure is tending to be easily designed, so its development is more rapid than the microelectronics structure. There are successful cases in two camps. Micro cores are often used in embedded design of robots and medical devices because its system is in separate, protected storage spaces. This is impossible for monocular design, and it is necessary to use the way to load the module.

Although Mach is a well-known multi-purpose micronuclei, people still have developed several microennons thanby. L3 is a demo kernel, just to prove that the microennuclear design is not always low running speed. Its subsequent version L4 can even run the Linux kernel as a process of separate address spaces.

QNX is a mini kernel system designed from the 1980s. It is more close to the micron core than MACH. It is used in some special fields, in which case system failure is not allowed due to software errors. For example, the robot on the space shuttle, as well as a machine with a telescope lens, a little mistake will result in a loss of thousands of US dollars.

Many people believe that because MACH cannot solve some problems targeted when proposed microelectroconuclear theory, microuclear technology is useless. Mach's enthusiasts show that this is a very narrow point of view, and unfortunately, it seems that everyone will start to accept this view.

Mixed kernel

The mixed kernel is a micro-kernel, but it allows some micropallocons to run in the code of user space running in kernel space, which makes the kernel's efficiency more efficient. This is a compromise practice, and the designer refers to the theory of poor running speed of micro-nuclear structures. However, later experiments have shown that the system of pure microenvironment can actually be efficient. Most modern operating systems follow this design category, Microsoft Window is a good example. There is also an XNU, the kernel running on the Apple Mac OS X is also a mixed kernel.

Example of a mixed kernel:

Microsoft Windows NT and Full Series Operating System Based on NT Technology XNU Dragonfly BSD Reactos

Some people think that there is no difference between single-core systems and mixing kernel systems that can load modules at runtime. This is not correct. Mix means that it absorbs a certain design pattern from a single core and micronucleus system, such as some non-critical code runs in user space, and others operate in kernel space, which is just for efficiency.

External core

The outer core system is also referred to as a longitudinal structure operating system, making a comparative extreme design method.

Its design concept is to let the user's designer to determine the design of the hardware interface. The external core itself is very small, it is usually only responsible for system protection and system resource multiplexing related services.

Traditional kernel design (including single cores and micronucleus) have abstract hardware, hidden in hardware abstraction layers. For example, in these systems, if you assign a physical storage, the application doesn't know its actual location.

The objective goal is to let the application request a specific physical space, a specific disk block, and the like. The system itself only guarantees that the requested resource is currently idle, and the application allows you to access it directly. Since the external nuclear system only provides a relatively low hardware operation, there is no advanced hardware abstraction like other systems, then add additional runtime support. These runtime runs over the outer core and provide a complete function to the user program.

In theory, this design allows all kinds of operating systems to run on a skilled, such as Windows and UNIX. And the designer can adjust the part of the system according to the operating efficiency.

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

New Post(0)