The kernel is the core component of the operating system. It loads at computer startup and resides in memory. In memory, user processes are also loaded but they are separate from the kernel. The kernel has private space in memory that is not accessible to user programs. The kernel runs and manages application programs like browsers and word processors. The kernel also manages hardware. Kernel acts as a service to communicate between hardware and software.
What is Microkernel
A microkernel is a type of kernel which manages scheduling, interprocess communication (IPC) and memory management. In a microkernel non-essential parts of the kernel are moved to user space.
Note that in user space application programs are placed but in microkernel device drivers, file servers, application IPC and Unix servers are also placed.
In microkernel virtual memory, scheduling and basic IPC are placed in kernel space.
In microkernel, if any service fails then OS still works and only that service is affected.
Different types of server run in the microkernel. One server runs in user space while the other type of server runs in kernel space. Both types of servers communicate with each other through IPC (Interprocess communication) calls.
Examples of Microkernel
Some examples of microkernel OS are:-
What is a Monolithic kernel
In a monolithic kernel, only application programs reside in user space while all other system programs are placed in kernel space. Some system programs that are placed in kernel space are file system, device driver, system calls, IPC, dispatcher and scheduler are also placed in kernel space.
The problem with the monolithic approach is that if any service in the kernel fails then all the OS functionality fails.
In a monolithic OS, the kernel is larger but runs faster than the microkernel. It is difficult to debug the monolithic kernel because all the services are placed in the same place.
Many securities issues occur in the monolithic kernel because user programs have direct access to services that are placed in user space like device drivers, system calls etc.
Examples of Monolithic kernel
Some examples of monolithic kernel OS are:-
Microkernel Vs Monolithic kernel
Small in size
Large in size
Easy to add new functionality
Difficult to add new functionality
Less number of lines in the kernel
A large number of lines in the kernel
In a microkernel, components have to communicate through message passing
There is no need for message passing and context switching required
It is more secure
Security issues occur because all the services are placed in the user space
The kernel provides low-level device management services and IPC
All OS services are included in the kernel
If any component fails then OS still works
If any component fails then all OS crashes
New services can be added easily
If the user has to add a new service then he has to modify the whole OS
It is slower than a monolithic kernel
It is faster than a microkernel
It is easy to debug and manage
It is difficult to debug and manage
It is easy to install, design and implement
Os is complex to design
Examples of microkernel OS are Windows NT, macOS, Symbian, QNX etc.
Examples of monolithic kernel OS are Linux, UNIX, BSDs, Windows 98, Windows 95, Windows Me etc.