Kernel operating system

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.

Content

  • 1 Types of core architectures operating systems
    • 1.1Monolithic core
    • 1.2 Modular core
    • 1.3 Micronucleus
    • 1.4Exyadro
    • 1.5No-core
    • 1.6Hybrid core
  • 2Combination of different approaches
  • 3Links
  • 4 Literature

Types of Core Architectures

Monolithic core

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.

  • Advantages : Speed ​​of work, simplified development of modules.
  • Disadvantages: Since the entire kernel operates in the same address space, a failure in one of the components may interfere with the performance of the entire system.

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.

Modular core

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).

Microkernel

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.

  • Advantages: Resistance to equipment failure, errors in system components. The main advantage of the micronuclear architecture is the high degree of modularity of the operating system kernel. This greatly simplifies adding new components to it. In a microkernel operating system, you can load and unload new drivers, file systems, etc., without interrupting its operation. The process of debugging kernel components is significantly simplified, since the new version of the driver can be loaded without restarting the entire operating system. The core components of the operating system are not fundamentally different from user programs, so you can use conventional tools to debug them. The microkernel architecture improves system reliability, since an error at the unprivileged program level is less dangerous than a failure at the kernel mode level.
  • Disadvantages : Data transfer between processes requires overhead.

Classic microkernels provide only a very small set of low-level primitives, or system calls that implement the basic services of the operating system.

  • Service processes (in the UNIX family terminology - “demons”) are widely used in a variety of operating systems for tasks such as running programs on a schedule (UNIX and Windows NT), event logging (UNIX and Windows NT), centralized password checking and storing passwords. current interactive user in a specially limited memory area (Windows NT). However, OS should not be considered microkernel only because of the use of such an architecture.

Examples: Symbian OS; Windows CE; OpenVMS; Mach, used in GNU / Hurd and Mac OS X; QNX; AIX; Minix; ChorusOS; AmigaOS; MorphOS.

Exoduct

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.

Nanojet

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 core

Hybrid kernels are modified microkernels that allow launching “non-essential” parts in kernel space to speed up work. Example: Windows NT kernels.

Combination of different approaches

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
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Operating Systems and System Programming

Terms: Operating Systems and System Programming