Kernel (operating system)

from Wikipedia, the free encyclopedia

A kernel (English [ ˈkɝːnəl ], translated kernel ), also operating system kernel (or shortened system kernel ), is the central component of an operating system . It defines the process and data organization on which all other software components of the operating system are based. It forms the lowest software layer of the system and has direct access to the hardware. Other software components of an operating system are usually in a higher-level layer. The construction of an operating system kernel belongs to the subject area of computer science and software technology .

Common requirements for a kernel are parallel processing of different tasks ( multitasking ), compliance with time-critical limits, openness for a wide variety of applications and extensions.

Components

A kernel (depending on the structure) is divided into layers (or layers, see layer architecture ), with the lower (machine-level) layers forming the basis for the layers above. The upper layers can call functions of the lower layers, but not vice versa.

The following layers are available (from bottom to top):

The structure of the monolithic kernel, microkernel and hybrid kernel in comparison.

If all these functions are integrated in the kernel itself, it is called a monolithic kernel . With a microkernel, on the other hand, essential parts take place in separate processes . The hybrid kernel represents an intermediate stage , in which a subset of the functions is part of the kernel and the rest is outsourced.

In addition to the variants mentioned, there are also Exokernels , which are limited to dividing the hardware between the processes. All further steps are left to the processes themselves. The use of exokernels is rare.

The kernel itself runs in so-called kernel mode , together with device drivers and other hardware-related applications. The kernel must be distinguished from the kernel mode. With Windows NT, not every application that runs in kernel mode is also part of the kernel. In addition to the actual kernel (ntoskrnl.exe), other applications run in kernel mode, e.g. B. the Hardware Abstraction Layer (hal.dll).

tasks

An operating system kernel has the following tasks:

  • Interface to user programs (start, stop, input / output, memory access)
  • Control of access to processor , devices, memory (scheduler, device driver, memory protection). If possible, only the kernel has access to these resources.
  • Distribution of resources such as processor time or processors to the user programs.
  • Structuring of resources, e.g. mapping of file systems to block-oriented devices such as hard disk drives , network stacks on network cards.
  • Resolution of access conflicts, such as locking in multiprocessor systems, queues when resources are scarce.
  • Virtualization of resources (processor: processes, hard disk: files, network card: e.g. sockets, memory: virtual memory, devices: special files).
  • Monitoring of access rights to files and devices in multi-user systems .

Processes

The concept of the process (task) is often used to implement an operating system . A process contains (at least) one set of registers of the processor and can be stopped and restarted via the scheduler. Each process has controlled access to a part of the memory as well as input and output channels that access files or devices. It communicates with the operating system kernel via system calls. A program normally runs in exactly one process, and in exceptional cases in several processes. Some system services also run within processes.

Start

When a computer is booted , after a possible hardware check and a partial device initialization, the kernel is loaded into memory using a bootloader and started. The kernel then completely initializes the devices and starts another process . In MS-DOS this is a command line interpreter , in more complex operating systems it is a specific application . In Unix-like systems , this is usually the one initthat loads all system services and, if necessary , starts a graphical user interface after a login .

species

If several processes can run on one kernel at the same time, one speaks of multitasking kernels. In reality, however, the CPU only ever handles one process at a time (except for multi-core systems). In most cases, the change is handled by the scheduler . If a multitasking kernel is supplemented by access management to processes and devices, a multiuser (or multi-user) system is obtained. Several users can work on it at the same time. Every user has to log in (authentication). The kernel assigns each process to a user; a user can own several processes. Process rights are restricted depending on the user. The kernel is responsible for separating the processes and thus the users.

Although today's desktop systems are usually only used by one user at a time, they are designed as a multi-user system. On the one hand, several users, each with their own rights and preferences, can then use the system and, on the other hand, there is the possibility that in addition to the user who uses the computer directly, someone else runs other programs from another computer. In addition, the system services are started under anonymous users. Each system service and each user can thus be granted their own restricted access rights that are necessary for their work, which increases system security drastically.

Trivia

At Commodore , the kernel was called " Kernal " for a long time . Rumor has it that resulted from a clerical error in the manuals for the Commodore computers, which then unceremoniously Commodore as a separate term for the kernel explained and subsequently as Backronym was reinterpreted: " K eyboard E ntry R ead, N etwork, A nd L ink ".

See also

Web links

Individual evidence

  1. a b c d Andrew S. Tanenbaum, Herbert Bos: Introduction In: Modern Operating Systems No. 4, 2015, pp. 3–84
  2. Mark Russinovich, David A. Solomon, Alex Ionescu. In: Windows Internals No. 6, 2012, p. 47
  3. Rheinwerk Computing :: Linux - 27 Bootstrap and Shutdown. Retrieved May 25, 2017 .
  4. Rheinwerk Computing :: Linux - 27 Bootstrap and Shutdown. Retrieved May 25, 2017 .