What is Kernel and different types of Kernels?


Kernel is the important part of an Operating System. The kernel is the first program that is loaded after the boot loader whenever we start a system. The Kernel is present in the memory until the Operating System is shut-down.

Kernel provides an interface between the user and the hardware components of the system. When a process makes a request to the Kernel, then it is called System Call.

Functions

The functions of the kernel are as follows −

  • Process management

  • Access computer resources

  • Device management

  • Memory management

  • Interrupt handling

  • I/O communication

  • File system...etc.

Access Computer resource − A Kernel accesses various computer resources like the CPU, I/O devices and other resources. Kernel is present in between the user and the resources of the system to establish the communication.

Resource Management − Kernel shares the resources between various processes in a way that there is uniform access to the resources by every process.

Memory Management − Generally memory management is done by the kernel because every process needs some memory space and memory has to be allocated and deallocated for its execution.

Device Management − The allocation of peripheral devices connected in the system used by the processes is managed by the kernel.

Types of Kernel

The different types of kernels are as follows −

Monolithic Kernels

In monolithic Kernels both user services and the kernel services are implemented in the same memory space. By doing this, the size of the Kernel is increased and at the same time it increases the size of the Operating System. As there is no separate User Space and Kernel Space, so the execution of the process will be faster in Monolithic Kernels.

Advantages

The advantages of monolithic kernels are as follows −

  • It provides CPU scheduling, memory scheduling, file management through System calls.

  • Execution of the process is fast as there is no separate space.

Disadvantages

The disadvantages of monolithic kernels are as follows −

  • If the service fails, then the system failure happens.
  • If you try to add new services then the entire Operating System needs to be modified.

Microkernel

A Microkernel is not the same as the Monolithic kernel. It is a little bit different because in a Microkernel, the user services and kernel services are implemented into different spaces. Because of using User Space and Kernel Space separately, it reduces the size of the Kernel and in turn, reduces the size of the Operating System.

As we are using different spaces for user and kernel service, the communication between application and services is done with the help of message parsing because of this it reduces the speed of execution.

The advantage of microkernel is that it can easily add new services at any time.

The disadvantage of microkernel is that here we are using User Space and Kernel Space separately. So, the communication between these can reduce the overall execution time.

Hybrid Kernel

It is the combination of both Monolithic Kernel and Microkernel. It uses the speed of the Monolithic Kernel and the modularity of Microkernel.

Hybrid kernels are micro kernels having some non-essential code in kernel-space in order for the code to run more quickly than it would be in user-space. So, some services like network stack or file systems are run in Kernel space to reduce the performance overhead, but still, it runs kernel code as servers in the user-space.

Nanokernel

The name suggests the complete code of the kernel is very small, which means the code executing in the privileged mode of the hardware is very small. The term nanokernel is used to explain that the kernel supports a nanosecond clock resolution.

Exokernel

Exokernel is an Operating System kernel developed by the group of MIT parallel and the Distributed Operating Systems. In this type of kernel, the resource protection is separated from the management which results in allowing us to perform applicationspecific customization.

In the Exokernel, there is no force abstraction and this is the feature that makes it different from a Monolithic Kernel and Microkernel. But the drawback of this is the complex design. The design of the Exokernel is very complex.

Updated on: 26-Nov-2021

6K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements