Lecture
Kernel (kernel) - the central part of the operating system (OS), which provides applications with coordinated access to computer resources, such as processor time, memory, external hardware, external input and output device information. Also, the kernel usually provides file system services and network protocols.
As a fundamental element of the OS, the kernel is the lowest level of abstraction for accessing applications to the system resources necessary for their work. As a rule, the kernel provides such access to the executable processes of the corresponding applications by using interprocess communication mechanisms and applying applications to the OS system calls, in Windows this program is referred to as AppLocker in managing local security or by calling the "gpedit" command.
The described task may vary depending on the type of architecture of the kernel and the method of its implementation.
The monolithic core provides a rich set of hardware abstractions. All parts of the monolithic core work in the same address space. This is a scheme of the operating system in which all components of its core are integral parts of the same program, use common data structures and interact with each other by directly calling procedures. The monolithic core is the oldest way to organize operating systems. An example of monolithic kernel systems is most UNIX systems.
Examples: Traditional UNIX kernels (such as BSD), Linux; MS-DOS kernel, KolibriOS kernel.
Some old monolithic kernels, especially UNIX / Linux class systems, required recompilation at any change in the hardware composition. Most modern kernels allow, during operation, to load modules that perform part of the core functions. In this case, the components of the operating system are not independent modules, but components of a single large program, called a monolithic kernel, which is a set of procedures, each of which can call each. All procedures work in privileged mode.
The modular core is a modern, improved modification of the architecture of the monolithic cores of operating systems.
In contrast to the "classic" monolithic cores, modular cores, as a rule, do not require a complete recompilation of the core when the composition of the computer hardware is changed. Instead, modular kernels provide one or another mechanism for loading kernel modules that support this or that hardware (for example, drivers). At the same time, the modules can be loaded either dynamically (on-the-fly, without rebooting the OS, in a running system) or static (performed when the OS is rebooted after the system is reconfigured to load certain modules).
The microkernel provides only elementary process control functions and a minimal set of abstractions for working with equipment. Most of the work is done through special user processes called services . The decisive criterion for “microkernels” is the placement of all or almost all of the drivers and modules in service processes, sometimes with the apparent inability to load any expansion modules into the microkernel itself, as well as the development of such extensions.
Classic microkernels provide only a very small set of low-level primitives, or system calls that implement the basic services of the operating system.
Examples: Symbian OS; Windows CE; OpenVMS; Mach, used in GNU / Hurd and Mac OS X; QNX; AIX; Minix; ChorusOS; AmigaOS; MorphOS.
The exo-kernel is the core of the operating system, providing only functions for interaction between processes, secure allocation and release of resources. It is assumed that APIs for application programs will be provided by libraries external to the kernel (whence the name of the architecture).
The ability to access devices at the controller level will make it possible to more effectively solve some tasks that do not fit into the universal OS framework, for example, a DBMS implementation will have disk access at the disk sector level, rather than files and clusters, which will have a positive effect on performance.
The nano-core is the core architecture of the operating system, within which an extremely simplified and minimalistic core performs only one task — the processing of hardware interrupts generated by computer devices. After processing hardware interrupts, the nano-core, in turn, sends information about the processing results (for example, characters received from the keyboard) to the overlying software using the same interrupt mechanism. An example is KeyKOS - the very first OS on a nano-kernel. The first version was released back in 1983.
Hybrid kernels are modified microkernels that allow launching “non-essential” parts in kernel space to speed up work. Example: Windows NT kernels.
All considered approaches to building operating systems have their advantages and disadvantages. In most cases, modern operating systems use various combinations of these approaches. For example, now the “Linux” kernel is a monolithic system with individual elements of the modular core [ source not specified 1236 days ] . When compiling a kernel, you can allow dynamic loading and unloading of so many components of the kernel - the so-called modules. When a module is loaded, its code is loaded at the system level and communicates with the rest of the kernel. Inside the module, any functions exported by the kernel can be used.
There are variants of the GNU OS, in which, instead of a monolithic kernel, the Mach kernel is used (the same as in Hurd), and the same processes that would be part of the kernel using Linux are spinning over it. Another example of a mixed approach is the ability to run an operating system with a monolithic kernel under the control of a microkernel. This is how 4.4BSD and MkLinux are based, based on the Mach microkernel. The microkernel provides virtual memory management and low-level drivers. All other functions, including interaction with application programs, are performed by a monolithic core. This approach emerged as a result of attempts to take advantage of the micronuclear architecture, while retaining the monolithic core code as well as possible.
A mixed core, in principle, should combine the advantages of a monolithic core and a microkernel: a seemingly microkernel and a monolithic core - the extremes, and a mixed one - the golden mean. It is possible to add device drivers to them in two ways: inside the kernel and into user space. But in practice, the concept of a mixed core often emphasizes not only the merits, but also the disadvantages of both types of nuclei.
Examples: Windows NT, DragonFly BSD.
Comments
To leave a comment
Operating Systems and System Programming
Terms: Operating Systems and System Programming