2.5.3 Special Operating System - Microkernel Operating System: Microkernel, Process from Monolithic Kernel to Microkernel, Comparison Between Monolithic Kernel and Microkernel

2.5.3 Special Operating System - Microkernel Operating System: Microkernel, Process from Monolithic Kernel to Microkernel, Comparison Between Monolithic Kernel and Microkernel

microkernel

The microkernel operating system is mainly aimed at a single kernel.
Most modern operating systems have two working states, namely the core state and the user state. General applications work in user mode, while the most basic operating system core of the kernel module works in kernel mode.

Putting the traditional operating system code at a higher layer removes as much as possible from the operating system, leaving only the smallest core, called the microkernel. (C/S structure)
Please add a picture description
Kernel services of the operating system: exceptions and interrupts, timers, I/O management, etc.

Process from monolithic kernel to microkernel

It is generally believed that the essential services of the operating system kernel are exceptions and interrupts, as well as timers and I/O management and so on. Conventionally, the core state of an ordinary operating system may involve the kernel of the operating system that user programs cannot directly access, including memory space and some accessed objects, which can only be accessed in the core state.

This state has certain requirements for permissions. In the common operating system, the core state and user state can allow the application program to actively make system calls during the regular execution of the application program, thereby invoking some services that the core state needs to access. or work.

After jumping from the user state to the core state, this jump can be interrupted and then returned to the user state. From the perspective of an ordinary single-operated kernel system, it will be considered that the core state of the operating system has many tasks, and once these tasks go wrong, It means that there is an error in the bottom layer of the i operating system, which is likely to cause a system crash, such as a blue screen. In this case, it will be considered that such an operating system is not reliable.

Later, the operating system has such a development trend, extracting some unnecessary functions from the core state and putting them in the upper level. In the core state, only the necessary exceptions and interrupts, as well as timers and I/O are retained. Management and other management work, all other work is placed in the user state. In this case, the things that the core state of the game can handle can be handled in the user state. During this process, the user process will send some corresponding requirements to the process. The required server and the two communicate. After the communication, the process server returns the results of the required things to the user process, so that there is no need to switch to the core state first, and then switch to the user state to return after processing.

A lot of tailoring and compression has been done on the work of the core state. During this process, the core state only processes the user's request and the response answer, so as to interact. This is the core state. After this core is compressed, it is the micro kernel .

After the work originally handled by the core state in the operating system is handed over to the user state, the user process will be converted into a C/S structure in the user state, and it will also quickly integrate with the client and server structures. When the client process submits a request, the request will be sent to the server process, and the server process will complete the relevant work and return the corresponding result.

Monolithic Kernel vs Microkernel

The test mainly involves the characteristics of the table

substance advantage shortcoming
monolithic core All functions such as graphics, device drivers, and file systems are implemented in the kernel, running in the kernel state and the same address space Reduce the system overhead of inter-process communication and state switching, and obtain higher operating efficiency The kernel is huge, takes up more resources and is not easy to tailor the stability and security
of the system.
microkernel Only implement basic functions, and put graphics system, file system, device driver and communication functions outside the kernel The core is refined, easy to cut and transplant. The system service program runs in the user address space, and the reliability, stability and security of the system are relatively high.
Can be used in distributed systems
User state and kernel state need to be switched frequently, resulting in a system that is not as efficient as a single kernel

Guess you like

Origin blog.csdn.net/qq_41929714/article/details/129571457