contador Saltar al contenido

Difference between microkernel and monolithic kernel

The kernel is the main part of an operating system; manages system resources. The kernel as a bridge between the application and the computer hardware. The kernel can be further classified into two categories: Microkernel and Monolithic Kernel. Microkernel that where user services and kernel services are kept in a 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 the monolithic kernel with the help of the comparison table shown below.

Comparative chart

Basis for Monolithic Micro Kernel Comparison
Basic In microkernel and kernel user services, services are kept in a separate address space. In the monolithic kernel, both user services and kernel services are kept in the same address space.
Cut it Microkernel is smaller in size. The monolithic kernel larger than the microkernel.
execution Slow execution. Fast execution.
extensible The easily extensible microkernel. The monolithic kernel difficult to extend.
Safety If a service crashes, it affects the functioning of the microkernel. If a service crashes, the whole system crashes in the monolithic kernel.
Code To write a microkernel, you need more code. To write a monolithic kernel, you need less code.
Example QNX, Symbian, L4Linux, Singularity, K42, Mac OS X, Integrity, PikeOS, HURD, Minix and Coyotos. Linux, BSD (FreeBSD, OpenBSD, NetBSD), Microsoft Windows (95, 98, Me), Solaris, OS-9, AIX, HP-UX, DOS, OpenVMS, XTS-400 etc.

Definition of Microkernel

Being a kernel, Microkernel manages all system resources. But in a microkernel, i user services and i services of the kernel they are implemented in different address spaces. User services are held in the user address space and kernel services are maintained in the kernel address space . there decreases the size of the kernel and further reduces the size of the operating system.

In addition to communication between the application and the system hardware, the microkernel provides minimal process and memory management services. Communication between the client program / application and the services running in the users' address space is established by passing messages. They never interact directly. This reduces the speed of execution of the microkernel.

In a microkernel, user services are isolated from kernel services, so if any user service fails, it does not affect the kernel service and therefore the operating system remains unchanged . This is one of the advantages of the microkernel. The microkernel easily extensible . If new services are to be added, they are added to the users' address space and, therefore, the kernel space does not require any modification. The microkernel is also easily transportable, safe and reliable.

Definition of the monolithic kernel

The monolithic kernel manages system resources between the application and the system hardware. But unlike the microkernel, user services and kernel services are implemented in the same address space. This increases the size of the kernel, further increases the size of the operating system.

The monolithic kernel provides CPU planning, memory management, file management and other operating system functions through system calls. Since user services and kernel services both reside in the same address space, this results in the rapid operation of the operating system.

One of the disadvantages of the monolithic kernel that if one service fails, the whole system crashes. If you need to add a new service in the monolithic kernel, you need to modify the entire operating system.

Key differences between Microkernel and Monolithic Kernel

  1. The base point on which we distinguish microkernel and monolithic kernel which microkernel implements user services and kernel services in several address spaces and the monolithic kernel implements both user services and kernel services in the same address space .
  2. The size of the microkernel small, since only the kernel services reside in the kernel address space. However, the size of the monolithic kernel comparatively greater microkernel because both kernel services and user services reside in the same address space.
  3. Running the monolithic kernel faster since the communication between the application and the hardware is established through the system call . On the other hand, running microkernels slow since communication between the application and the system hardware is established through the passing of messages .
  4. easy to extend microkernel because you need to add a new service in the user address space isolated from the kernel space, so the kernel does not need to be changed. Opposite the case of the monolithic kernel if you have to add a new service in the monolithic kernel, then you need to modify the whole kernel.
  5. Microkernel pi sure of the monolithic kernel as if a service failed in the microkernel the operating system remained unaltered. On the other hand, if a service fails in the monolithic kernel, the whole system fails.
  6. Monolithic kernel design requires less code, which leads to fewer bugs. On the other hand, microkernel design requires more code, which leads to more bugs.

Conclusion:

Slower but safer and more reliable microkernel than the monolithic kernel. The monolithic kernel is fast but less secure as any service error can lead to a system crash.