Back

Kernel

Idealogic’s Glossary

Kernel is the central and the most important component of the operating system (OS) of a computer. It is the core which forms the basic services to the other components of the OS. It is the core component of operating system that manages processes, memory, files, inter process communication, device and networking.

First of all, in the initialization of the system, BIOS and other hardware devices are loaded. The bootloader is loaded, and the kernel is put in the protected memory space, and cannot be accessed by interrupts. After the Kernel is loaded by the BIOS, it takes over the control and starts loading other components of the Operating System in preparation of the system. If the kernel fails to load or get corrupted in any way then the computer will be rendered useless and will have to be fixed.

Purpose of the Kernel

The kernel has three primary responsibilities:

  1. Showing methods of interaction between the user or the application and the computer.
  2. Managing and launching applications.
  3. Handling system hardware devices.

In more detail, the kernel accomplishes these tasks by:

  • Managing and governing non-critical parts of the operating system for example device drivers.
  • Supervision and control of the threads and processes which are created when applications are launched.
  • Control of the application requests for the resources of the system and the scheduling of the use of these resources.
  • Assigning a specific location in the memory to each and every application.
  • Managing the cpu usage, the filesystem and handling the network i/o.
  • Inputs/outputs and system calls through interrupts and drivers of the handling device.

The kernel maintains proper co-ordination and control by controlling the access of the processes to the hardware resources such as memory and the CPU to avoid competition. It runs in the protected memory space that means no other application can interrupt its working, hence the system efficiency and stability is not compromised.

This is different from the shell which is the outermost layer of the OS where user command are received. It is also not in the BIOS, which is a program that facilitates hardware and loads the kernel during booting process.

Device Drivers

One of the most important tasks of the kernel is managing hardware devices through so called device drivers. Instead of communicating with each connected device the kernel uses drivers to communicate with such hardware as printers, display cards and other peripherals. New drivers are installed during os installation and updated in case new devices are connected to the system.

Types of device drivers include:It is important to point out that:

  • Character device drivers:The control of the data streams, the opening and reading of the data, and writing to the data.
  • Block device drivers: Devices that transfer data in a block by block fashion.
  • Network device drivers: Control network interfaces and packets of data.

Drivers operate in two modes:Drivers operate in two modes:

  • As for the
  • The other mode is the User mode that is available for the peripheral devices added by the user for instance printers.

Kernel Mode & User Mode

Processors operate in two modes:

  1. Kernel mode: Offers the direct control over system resources which are used by the OS kernel and its core services.
  2. User mode: It is utilized in applications which do not have direct access to system resources. These applications have to make system calls in a bid to request for resources which are under the control of the kernel. The processor can operate in these modes and toggles between the modes in order to provide security to the system components.

Types of Kernels

Kernels are classified into various types based on architecture and functionality:

  • Microkernel: Divides the user processes and kernel services in two different address spaces where the user processes have the ability to switch between them and this provides flexibility and security but at the same time it has the disadvantage of the additional time and resources needed for the communication between the two.
  • Monolithic kernel: Merges all services into one address space thereby enhancing the communication between the hardware and software but at the same time posing a high risk of being attacked. Monolithic kernel is best described with the example of the Linux kernel.
  • Hybrid kernel: A hybrid of both microkernel and monolithic kernel architectures which are used in such operating systems as macOS.
  • Nanokernel: Provides the user with the essential functions and mainly targets the manipulation of the low-level hardware.
  • Exokernel: Enables applications to have better access to the hardware resources hence better control and management.
  • Multikernel: Splits the hardware resources into several partitions, it is widely used in distributed systems and multi-core processors to enhance the reliability and the performance.
  • Microkernels vs. Monolithic Kernels

Microkernels and monolithic kernels are different in the way that they provide services and space for addresses. Microkernels are said to implement message passing as a means of communication, which is a better approach since services are segregated. However, in monolithic kernels, all services share a single address space and thus communication between them is faster, but if one service is problematic then it causes system failure.

Conclusion

Kernel is the most essential part of the Operating System. It is managing the systems resources, it is responsible for the hardware and software of the system, processes, memory, and devices. Kernels are important components that enable the proper functioning of the system, taking into account such factors as performance, security, and versatility, which are necessary for today’s computing systems.