Microkernel in Operating System
Overview
A kernel is the most important part of an operating system. It manages the resources of the system and also acts as an interface between hardware and the computer application. A microkernel is one type of kernel. It manages all system resources. After bootloader, it is the first program that is executed/loaded on starting up the PC.
What is a Microkernel in an Operating System?
Microkernel in an operating system is one of the kernel’s classifications. In the microkernel, the user service, as well as the kernel service, are all implemented on different kernel spaces.
In the user address space, all the user services are kept while in the kernel address space, all the kernel services are available. Thus, by doing this, the size of the kernel as well as the size of an operating system is reduced.
It is used for communicating between applications or client programs and services that are running in the address space of the user are established by message passing, thereby reducing the speed of the microkernel. It also provides minimal service of memory management and process.
Since the user service and kernel service are isolated from each other, the operating system remains unaffected if any user service is failed as it does not affect the kernel service. It can be extended if any new service is to be added as they are added to the user space and no modification is needed in the kernel space. It is secure, portable, and reliable.
Architecture of Microkernel OS
A kernel is the core part of an operating system which means that all the important services are handled by it. Because of this, in the architecture of the microkernel, the important services reside within the kernel and the rest of the services reside within the system’s application program.
The important services for which the microkernel is responsible are:
- Inter-process communication
- Scheduling of CPU
- Memory management
Inter-process communication It refers to how processes interact with each other. A process has many threads. Threads of any process can interact with each other in kernel space. Messages are sent and received using ports across threads.
There are several ports at the kernel level like process port, registered port, bootstrap port, and exceptional port. All of the ports interact with each other by using a user-space process.
Scheduling of CPU It refers to which process will be executed next. All the processes reside in a queue and are executed one at a time. There are levels of priority in every process and the process that has the highest process is executed first.
It helps in the optimization and utilization of the CPU to the maximum by utilizing the resources efficiently. It minimizes the waiting time, response, and turnaround times.
Memory management It is the process of allocating space in memory for processes. Virtual memory is also created if the process has a size bigger than that of the actual memory by which the memory is divided into portions and stored. All the processes wait in memory before CPU execution.
Components of Microkernel Operating System
A microkernel contains only the basic functions of the system. A component in the microkernel is included if and only if putting the component outside disrupts the operation of the system.
For non-essential components, user mode should be used. Following are some of the functionalities of components of the microkernel:
- Processors, as well as thread schedulers, are included. The scheduling algorithm of the processor is also required in the microkernel.
- Address space and other memory management services are incorporated into the microkernel along with its security.
- For managing servers that execute their own address space, Inter-process communication is used.
Example of Microkernel Operating System
Here are a few examples of microkernel operating systems:
- Helen OS
- Minix
- Horizon
- The L4 microkernel family
- Zircon
Advantages of Microkernel Operating System
- These are secure since a few parts are added, the ones that might change the functionality of the system.
- Microkernels are modular, which means, various modules in them can be swapped, modified, and reloaded without affecting the kernel.
- Better performance since the architecture is compact and isolated.
- It is scalable and hence more systems can be introduced without disturbing each other.
- It adds new features without even recompiling.
- The interface of the microkernel helps in enforcing the modular structure.
Disadvantages of Microkernel Operating System
- Context switch or function call is needed while implementing drivers as procedures.
- Providing services are more costly in microkernel system as compared to traditional monolithic systems.
- The performance might be indifferent and can cause some issues.
Conclusion
- A kernel is the most important part of an operating system. It manages the resources of the system and also acts as an interface between hardware and the computer application.
- Microkernel in an operating system is one of the kernel’s classifications. In the microkernel, the user service, as well as the kernel service, are all implemented on different kernel spaces.
- The important services for which the microkernel is responsible are:
- Inter-process communication
- Scheduling of CPU
- Memory management
- Example of microkernel operating system:
- Helen OS
- Minix
- Horizon
- The L4 microkernel family
- Zircon
- A microkernel contains only the basic functions of the system. A component in the microkernel is included if and only if putting the component outside disrupts the operation of the system.