Kernel In Depth
3 min read
What is Kernel?
A kernel is a software that manages the hardware like CPU, RAM, Disk, etc.,
A kernel is the main component of the Linux Operating System (OS) and it is the core interface between the computers hardware and its processes
Linux kernel is a free, open-source, and UNIX-like operating system kernel. It is a modular and monolithic kernel.
It is often mistaken that Linus Torvalds has developed Linux Operating System, but actually, he is only responsible for the development of the Linux Kernel
Linux Operating System is the addition of Linux Kernel, GNU, utilities, and Libraries.
Tasks performed by Kernel
- Process management of application execution
- Memory and I/O (Input / Output) Management
- System call control (the core task of the kernel)
- Device management with the help of device drivers
Modes in a kernel
There are two modes inside a kernel they are:
- Kernel mode: In this mode, all the memory management, execution privileged instructions, interrupt handling, and process management activities are performed.
- User mode: In this mode, the CPU executes the process run by the user process management. device driver management and file handling is done.
Types of Kernel
- Monolithic Kernel
- Micro Kernel
- Hybrid Kernel
- Nano Kernel
- Exo Kernel
1. Monolithic Kernel:
In this type of kernel, there is only a single space defined, So this type of kernel is the fastest one.
In the same memory, both the kernel space and user space execution processes are very fast.
The disadvantage of this kernel is if any of the services fails then the entire operating system crashes.
This kernel is used by all the Linux operating systems
2. Micro Kernel:
The users space and kernel space are implemented in different memories(They are not in the same memory). This reduces the size of the kernel and hence it reduces the size of the operating system.
Hence it turns out to be a little bit slow as everywhere it's a different memory. Speed of execution is slow.
We can add new services easily (No need to modify the entire Operating system as in a Monolithic kernel-based Operating system ie Linux )
This kernel is been used by all Windows Operating system
3. Hybrid Kernel:
It picks the good things from both Monolithic and Micro Kernel
It takes the speed of Monolithic Kernel and Modularity of Micro Kernel.
Most of the user-related code is in user mode/space. The network and file system will run on kernel space. It only keeps the essential code in the kernel space.
Kernel Space -> Essential code and server code User Space -> Application code
As of now, it is used in latest version of Windows
4. Nano Kernel:
The whole code of the kernel is very small. The code execution on the hardware is also very small.
It supports Nanosecond clock resolution, that's where the name nano same from.
We don't use the Nano Kernel a lot.
5. Exo Kernel:
It is developed by MIT and the distribution operating system tool. It is used for parallel and distributed.
In this resource, protection is separate from management. These are application-specific operating systems. The design of Exo Kernel is very complex
Did you find this article valuable?
Support Prahlad Inala by becoming a sponsor. Any amount is appreciated!