What is microkernel in operating system

3 min


2 shares

Before I go to the main topic, I want to explain what is the kernel and also what are types of the kernel.

The kernel is the core system software that behaves as a bridge between application software and hardware of the system.

Application software or application programs are user-level programs that a user runs on the machine. For example, running MS Word, Chrome browser, Calculator, Vlc player etc.

The example of hardware are DVD writer, USB device, Mouse, Keyboard, Printer, LED monitor, hard drive, SSD drive, Speaker, etc.

The operating system is divided into two main parts:-

  1. User-level
  2. Kernel level

There are other parts also like hardware level and others. But two main parts of the operating system are user and kernel level.

Programs at the user-level are fewer privilege programs means they have less authority to access the hardware. While programs in kernel-level have high privilege meaning that they have high authority to access hardware.

There are various types of operating systems depending upon the structure of the kernel.

The main operating system types are:-

  1. Monolithic operating system or monolithic architecture or monolithic kernel
  2. Microkernel operating system
  3. Layered operating system or layered architecture
  4. Hybrid operating system or hybrid architecture or hybrid kernel

First I will explain a little about these four types of the operating system.

  1. Monolithic operating system: In a monolithic operating system, the kernel of the system is large. The monolithic kernel includes file management, process management, memory management and device management. Examples of the monolithic OS are Linux, SunOS, MULTICS, OpenVMS, BSD, and AIX.
  2. Microkernel operating system: In a microkernel operating system, the kernel is small and only contains memory management, inter-process communication and CPU scheduling. Examples of microkernel OS are Mac OS 8, Minix, L4Linux, Haiku, AmigaOS, and Plan 9.
  3. Layered operating system: in a layered operating system, the kernel is the central layer and caries out hardware interaction with other parts of the system (e.g. memory management, I/O, File management, and the user interface). An example of a layered OS is Windows NT.
  4. Hybrid operating system: In a hybrid operating system, the kernel is a combination of both monolithic kernel and microkernel. Examples of the hybrid OS are Windows server 2019, Xbox One, Windows 10, Windows Phone 8, and Windows Phone 8.1.
What is microkernel in operating system (os)
Microkernel In Operating System

What is microkernel:

Micro means small so a microkernel is a small kind of kernel in which only basic functionality of kernel is placed. The job of microkernel is to communicate between hardware controllers and application software.  The hardware controllers has job of giving orders to the hardware devices for read or write. For example to print a document, a user of computer sends request to microkernel. Microkernel then sends request to printer controller. Printer controller use spooling and sends data to the printer. The page will be printed and completion command is send to the user through microkernel.

Microkernel directly interacts with the hardware. No application software can directly access to hardware of the system. All the requests in user space are guided through microkernel.

Microkernel controls all the parts of the computer. You know that processor runs all the commands of the computer. Microkernel guides how the processor computes the instructions and which instruction is to be executed next.

The source code of the microkernel is about 10,000 lines. If you compare this with a monolithic kernel then it has a source code of a million line.

The core functionality of microkernel includes:-

  • Memory management
  • Inter process communication
  • CPU scheduling

Memory management involves allocating space for the processes in the main memory. And creating virtual memory for processes. Virtual memory means if any process has a larger size than the main memory then that process is divided into parts. Then each part of the process is kept in the main memory one by one until parts of the process are executed by the processor.

Inter process communication means how processes communicate with each other. One process consists of many threads. Threads of any process communicate with each other in the kernel space. Threads send/receive messages with each other through ports.  There are various ports at kernel level including process port, exceptional port, bootstrap port, registered port. All these ports interact with processes that are in the user space.

CPU scheduling means which process is to execute next by the CPU. All the processes are queued and then executed one by one. Every process has a priority level. The process which has high priority is executed first. CPU scheduling helps maximize CPU utilization. Also, resources are utilized more. It also minimizes waiting time. Waiting time means that a process has to wait less in the queue and resource is given to the process quickly. CPU scheduling also minimizes response time and turnaround time.

Some features of microkernel are:-

  • As the architecture of microkernel is small so its performance increase
  • New functionality can be added to the kernel easily
  • There are fewer chances that your system gets hang. This is because most parts of the monolithic kernel are placed in user space. If any part of the user space like the device driver face any problem then your system will still run.
  • Increase in stability and security
  • New features are added to the microkernel without recompiling the code



Like it? Share with your friends!

2 shares
Junaid Rehman

I am a blogger and freelance web developer by profession. I love to blog and learn new things about programming and IT World.