Monday, April 1, 2013

Micro-kernel vs Monolithic kernel


Micro-kernel

                              A micro kernel is a compact kernel where the core functionality like Inter-process communication and memory management runs in Kernel space while the system base services like processor Scheduler and device drivers runs in User space.Here kernel is divides into separate process,Known as servers. The communication of these servers which are kept in different address spaces is done by via message passing. 

                             This split allows better hardware independence of the operating system itself,thus an error in the kernel cannot cause the entire system to crash, if a kernel process crashes, it is still possible to re instated the system as a whole by merely restarting the service that caused the error.


Some OS that uses Micro kernel are MINIX, HURD ,QNX, L4.



Advantages:

The source code of kernel is very small only 4000 lines of C program.
Due to its small source code kernel is faster to boot .

Disadvantages:

Process management is complex,to make a single service call,first it has to build and send a message then for the reply it has to accept and decode.
Messaging bugs can be harder to fix due to its longer trip.

 
Monolithic Kernel

A monolithic kernel is a single large static binary file process where all services as well as core functionality are a tight knit group sharing the single address space. In this architecture entire services are loaded on boot up and reside in memory and work is done using system calls.

Linux was started as monolithic kernel,since Linux 2.0 version,it is considered as monolithic/modular kernel. it's called monolithic because the entire kernel is complied into one large executable file and loads into memory at system boot.it's called modular because it's only loads a small fragment of kernel called modules at run time,so that the basic kernel contains only those components that are necessary for the system to start itself and removed again after the boot.




OS that runs on Monolithic kernel are Linux,UNIX,BSD,Windows.

Advantages

Since all resources are handled in one place it could say that is is better in performance, and easy for kernel developers.
Faster integration of third party technology.
 
Disadvantages

Error in the kernel can cause the entire system to crash.
source code can become extremely large,nearly 6.34 million lines.


I will conclude this article by saying there is no OS architecture that is better than the other in the general sense.Regardless of the famous flame war between Linus Torvalds and Andrew Tanenbaum the philosophy behind micro kernels fascinates OS developers.however from the practical standpoint Linux WINS,Linux became so stable over the last 20 years and can run for years without crashing.

No comments:

Post a Comment