Site icon DataFlair

Kernel in Operating System

OS KERNEL

FREE Online Courses: Click, Learn, Succeed, Start Now!

The core component of the OS is known as a kernel. Kernel helps the OS manage the operations of the computer system and hardware, basically the memory and CPU time. It uses inter-process communication and system calls to act as a bridge between applications and data processing performed at hardware level.

It is the first program to load after the bootloader as it needs to handle the rest of the system for the OS. When an OS loads, the Kernel also loads into the memory and remains there until the OS is shut down again.

It handles disk management, task management, and memory management and decides which process to allocate to the CPU for execution. It also manages communication between the software and hardware

Functions of a Kernel

Following are the functions of Kernel:

1. Access Computer resource: A Kernel can access the CPU, I/O devices and other resources and acts as a interpreter between the user and the system resources.

2. Resource Management: A Kernel shares resources between processes such that every process has uniform access to the resources.

3. Memory Management: The kernel allocates and deallocates memory for process execution.

4. Device Management: Kernel manages the allocation of peripheral devices.

Kernel Mode and User Mode

Some instructions can only be executed by Kernel and in the Kernel Mode. As for the User Mode, the processes provided by the user are executed by the processor in the User Space.

Objectives of Kernel in OS

Types of Kernel

Technology is evolving rapidly!
Stay updated with DataFlair on WhatsApp!!

Following are the five types of kernel:

1. Monolithic Kernel:

In this, all OS services operate in the kernel space i.e., user services and kernel services are implemented in the same memory space. This increases the size of Kernel and OS makes the execution of a process faster. There are dependencies between system components. It has huge lines of code that make it complex.

Advantages of Monolithic kernel:

Disadvantages of Monolithic Kernel:

2. Micro Kernel:

This type has a minimalist approach along with virtual memory and thread scheduling. It is stable, has less services in the kernel space and puts rest in user space. This means that it makes use of both the kernel space and user. This reduces the size of the Kernel and OS. Communication is done through message parsing and that reduces the speed of execution.

Advantages of Micro Kernel:

Disadvantages of Micro Kernel:

3. Hybrid Kernel:

With the speed and design of a monolithic kernel and the modularity and stability of a microkernel, this type is a combination of monolithic and micro kernel. Some services like network stack and file systems are run in Kernel space in order to reduce performance overhead. Though, it runs kernel code as servers in the user-space.

Advantages of Hybrid kernel:

Disadvantages of Hybrid kernel:

4. Exo Kernel:

This kernel follows an end-to-end principle with least hardware abstractions. It handles the allocation of physical resources to applications. Separation of resource protection from management allows us to perform application-specific customization.

Advantages of Exo Kernel:

Disadvantages of Exo Kernel:

5. Nano Kernel:

This type offers hardware abstraction without system services. Due to micro kernels also not having system services, these two have become analogous to each other. The code of the kernel is very small and the Kernel supports nanosecond clock resolution.

Advantages of nano Kernel:

Disadvantages of Nano Kernel:

Summary

Kernel is the main and central component of an OS. It has five types, namely, monolithic kernel, microkernel, hybrid kernel, nano kernel, and exo kernel. The functions of a kernel include accessing computer resources, memory management, device management, and resource management.

Exit mobile version