Linux is monolithic ! but why ?is it safe ?

Before I try to convey  interesting  and informative stuff I recommend you to read these articles first

1)Monolithic Kernel

2)Microkernel

look at the visualization of different architectures provided in above links

3)monolithic vs microkernel   (this gives much easier and nice explanation)

key points to remember:-

Monolithic kernel

In  this everything like VFS,IPC ,File system handling every os stuff is in kernel address space and hence no concept of messaging.

also if it is a pure monolithic then it will be a single binary file which is required to recompile when required. and everything in kernel space makes kernel very big

 

Microkernel

In this kernel has abstract(basic) implementation of concepts like IPC ,virtual memory,scheduling etc… are done so that to facilitate communication between servers (i.e different parts in user space of micro-kernel like application IPC , device drivers etc..) with underlying hardware  devices.

also understand the difference between module in monolithic architecture(for Linux ) and server in micro kernel.

simply a module runs at the same memory space of the kernel and a server runs in a different one.although a module can surely be added/removed as required (Linux kernel does that), any misbehavior caused by it may affect the entire system, whether in the micro-kernel architecture, only the server gets effected not whole .

 

why was  linux  chosen to be monolithic kernel ?

Linux was designed by Linus Torvalds  . according to this oreilly..  Torvalds felt that a micro-kernel architecture wasn’t the only criterion for the “goodness” of a kernel .

If one is privileged to make a healthy guess then it may be because monolithic has less overhead like no IPC at kernel or building a microkernel architecture is really a hard task                   Linus thought that shared data structures were better; in fact he goes on to claim that an architecture not using shared data structures would  have a much harder time handling coherency .

 

Is Linux a pure implementation of Monolithic Kernel Architecture ?

whoa!! yes one will be confused with this question because a pure monolithic kernel is 1) a single binary file  2)all drivers are included in kernel  3)recompilation must be done repeatedly if something new is added to kernel or os for kernel

but wait we are not doing or facing any of the above stuff while using Linux isn’t ?

yes the secret is Linux uses MODULAR Kernel Architecture..,but be careful don’t think this architecture to be some new architecture…no , it is just a modification of Monolithic Kernel i.e modularity or concept of modules are introduced so that desired modules can be loaded or unloaded as required

Loadable kernel module

 

may be you want more info

modular kernel architecture

 

Is Linux as a Monolithic kernel is it faster than windows ?

due to it’s structure (i.e monolithic) it is obviously faster than hybrid or micro kernels due to no need for context switches.

but wait that is not the exact reason for it’s fastness like thing compared to windows but  actually even windows can be much faster but windows is an enterprise or business oriented and fastness for pc or systems is not a big concern for those folks , also windows has a small pool of developers compared to linux which is also one of the reason

also one key to remember is performance

 

then what about performance of Monolithic architecture?

this article is worth reading for this question

Performance of microkernel vs monolithic kernel

 

 

 

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s