Kernel is the core part of an operating system; it manages the system resources. Kernel is like a bridge between application and hardware of the computer. The Kernel can be classified further into two categories, Microkernel and Monolithic Kernel. Microkernel is the one in which user services and kernel services are kept in separate address space. However, in Monolithic kernel user services and kernel services both are kept in the same address space. Let us discuss some more differences between Microkernel and Monolithic kernel with the help of comparison chart shown below.
Content: MicroKernel Vs Monolithic Kernel
|Basis for Comparison||Microkernel||Monolithic Kernel|
|Basic||In microkernel user services and kernel, services are kept in separate address space.||In monolithic kernel, both user services and kernel services are kept in the same address space.|
|Size||Microkernel are smaller in size.||Monolithic kernel is larger than microkernel.|
|Execution||Slow execution.||Fast execution.|
|Extendible||The microkernel is easily extendible.||The monolithic kernel is hard to extend.|
|Security||If a service crashes, it does effect on working of microkernel.||If a service crashes, the whole system crashes in monolithic kernel.|
|Code||To write a microkernel, more code is required.||To write a monolithic kernel, less code is required.|
|Example||QNX, Symbian, L4Linux, Singularity, K42, Mac OS X, Integrity, PikeOS, HURD, Minix, and Coyotos.||Linux, BSDs (FreeBSD, OpenBSD, NetBSD), Microsoft Windows (95,98,Me), Solaris, OS-9, AIX, HP-UX, DOS, OpenVMS, XTS-400 etc.|
Definition of Microkernel
Microkernel being a kernel manages all system resources. But in a microkernel, the user services and the kernel services are implemented in different address space. The user services are kept in user address space, and kernel services are kept under kernel address space. This reduces the size of the kernel and further reduces the size of operating system.
In addition to the communication between application and hardware of the system, the microkernel provides minimal services of process and memory management. The communication between the client program/application and services running in user address space is established through message passing. They never interact directly. This reduces the speed of execution of microkernel.
In a microkernel, the user services are isolated from kernel services so if any user service fails it does not affect the kernel service and hence Operating system remain unaffected. This is one of the advantages in the microkernel. The microkernel is easily extendable. If the new services are to be added, they are added to user address space and hence, the kernel space do not require any modification. The microkernel is also easily portable, secure and reliable.
Definition of Monolithic Kernel
The monolithic kernel manages the system resources between application and hardware of the system. But unlike microkernel, the user services and kernel services are implemented under same address space. This increases the size of the kernel further increases the size of operating system.
The monolithic kernel provides CPU scheduling, memory management, file management and other operating system functions through system calls. As user services and kernel services both reside in same address space, this results in the fast executing operating system.
One of the drawbacks of the monolithic kernel is if any one service fails entire system is crashed. If a new service is to be added in monolithic kernel, the entire operating system is to be modified.
Key Differences Between Microkernel and Monolithic Kernel
- The basic point on which microkernel and monolithic kernel is distinguished is that microkernel implement user services and kernel services in different address spaces and monolithic kernel implement both user services and kernel services under same address space.
- The size of microkernel is small as only kernel services reside in the kernel address space. However, the size of monolithic kernel is comparatively larger than microkernel because both kernel services and user services reside in the same address space.
- The execution of monolithic kernel is faster as the communication between application and hardware is established using the system call. On the other hands, the execution of microkernel is slow as the communication between application and hardware of the system is established through message passing.
- It is easy to extend microkernel because new service is to be added in user address space that is isolated from kernel space, so the kernel does not require to be modified. Opposite is the case with monolithic kernel if a new service is to be added in monolithic kernel then entire kernel needs to be modified.
- Microkernel is more secure than monolithic kernel as if a service fails in microkernel the operating sytem remain unaffected. On the other hands, if a service fails in monolithic kernel entire system fails.
- Monolithic kernel designing requires less code, which further leads to fewer bugs. On the other hands, microkernel designing needs more code which furher leads to more bugs.
Microkernel is slower but more secure and reliable than monolithic kernel. Monolithic kernel is fast but less secure as any service failure may lead to system crash.