Micro-kernel
Micro-kernel
Hi,
I'm trying to understand micro-kernels (without success).
I really don't see the difference between a monolithic kernel and a microkernel.
Assume the following example in a monolithic system (linux?) :
A program wants to read from a file :
program calls int 80h (linux syscall) -> VFS layer -> Ext2 driver -> block device driver.
is this correct ?
Now how does this happen in a microkernel environment ? I heard that microkernels use "mailboxes" to exchange information (which sounds like a nice concept but I really don't understand how this is accomplished in a real OS like Mach or NT or BeOS).
Can someone please give me some more info on this ??
Thnx in advance,
Jeroen Jacobs
I'm trying to understand micro-kernels (without success).
I really don't see the difference between a monolithic kernel and a microkernel.
Assume the following example in a monolithic system (linux?) :
A program wants to read from a file :
program calls int 80h (linux syscall) -> VFS layer -> Ext2 driver -> block device driver.
is this correct ?
Now how does this happen in a microkernel environment ? I heard that microkernels use "mailboxes" to exchange information (which sounds like a nice concept but I really don't understand how this is accomplished in a real OS like Mach or NT or BeOS).
Can someone please give me some more info on this ??
Thnx in advance,
Jeroen Jacobs
Re: Micro-kernel
Have a look at www.qnx.com. This is an excellent example of a micro-kernel. It also has some very good documentation of the differences between monolithic and micro kernels.
Re: Micro-kernel
Well, I think that micorkernels load device drivers like an everyday program instead of part of the OS(like Windows and Linux).
K.J.
K.J.
Re: Micro-kernel
KJ is mostly right...
Monolithic Kernels hold device drivers in the Kernel Space ( ie the kernel ) of the OS.
Micro Kernels hold all of the device drivers like regular programs in User Space of the OS.
The biggest differences are:
Monolithic Kernel --
Doesn't always need Specialized Device Drivers
Sometimes requires recompiling of the Kernel when you add new hardware
Huge system failures when device drivers hang
Installation of drivers is rarely a simple task
Micro Kernel --
Device Drivers are actually just programs
Slower startup since the OS kernel must initialize each driver individually
System failures are minimal when device drivers hang
Installation of drivers generally is no more difficult than installing a normal application
Monolithic Kernels hold device drivers in the Kernel Space ( ie the kernel ) of the OS.
Micro Kernels hold all of the device drivers like regular programs in User Space of the OS.
The biggest differences are:
Monolithic Kernel --
Doesn't always need Specialized Device Drivers
Sometimes requires recompiling of the Kernel when you add new hardware
Huge system failures when device drivers hang
Installation of drivers is rarely a simple task
Micro Kernel --
Device Drivers are actually just programs
Slower startup since the OS kernel must initialize each driver individually
System failures are minimal when device drivers hang
Installation of drivers generally is no more difficult than installing a normal application
Re: Micro-kernel
>Now how does this happen in a microkernel environment ? I heard that microkernels use "mailboxes" to exchange information (which sounds like a nice concept but I really
don't understand how this is accomplished in a real OS like Mach or NT or BeOS).
A monolithic kernel is one big executable file. The
different parts communicate by function calls and global
variables. An errant pointer in one module could trash the
entire kernel.
In a microkernel, things like drivers and filesystems run
as separate tasks ("servers"), running in their own address
space, at user privilege if possible. What's left of the
kernel handles only threads, address spaces, and inter-
process communication (IPC). Mailboxes are one form of IPC.
Because a microkernel requires IPC, it's harder to write
than a monolithic kernel. In theory, it's slower than a
monolithic kernel but more reliable. In practice, they're
equally reliable, and the speed difference is not too great.
The L4 people (I think) figured out that first-generation
microkernels like Mach were slow because they were BIG,
not because of IPC.
don't understand how this is accomplished in a real OS like Mach or NT or BeOS).
A monolithic kernel is one big executable file. The
different parts communicate by function calls and global
variables. An errant pointer in one module could trash the
entire kernel.
In a microkernel, things like drivers and filesystems run
as separate tasks ("servers"), running in their own address
space, at user privilege if possible. What's left of the
kernel handles only threads, address spaces, and inter-
process communication (IPC). Mailboxes are one form of IPC.
Because a microkernel requires IPC, it's harder to write
than a monolithic kernel. In theory, it's slower than a
monolithic kernel but more reliable. In practice, they're
equally reliable, and the speed difference is not too great.
The L4 people (I think) figured out that first-generation
microkernels like Mach were slow because they were BIG,
not because of IPC.
Re: Micro-kernel
These depend greatly on the quality of the kernel (I'm not sure what you mean by the first point though).The biggest differences are:
Monolithic Kernel --
? Doesn't always need Specialized Device Drivers
? Sometimes requires recompiling of the Kernel when you add new hardware
? Huge system failures when device drivers hang
? Installation of drivers is rarely a simple task
Constrast Linux with Windows 2000. Windows 2000 doesn't need to be recompiled, and installing/deinstalling drivers is easy because of the full plug-and-play architecture. (Earlier versions of Windows NT were less friendly in this respect.) However, buggy drivers are still a problem, because they have full access to the whole system.
On the other hand Linux drivers are a huge mess (IMHO).
Not sure what you mean about the "slower startup". Monolithic kernels still need to initialise each driver at startup (or, at least the drivers which are needed). In fact, a good microkernel could initialise drivers in parallel if possible: for example, the mouse and the network card don't depend on one another, so they could get started up in parallel.Micro Kernel --
? Device Drivers are actually just programs
? Slower startup since the OS kernel must initialize each driver individually
? System failures are minimal when device drivers hang
? Installation of drivers generally is no more difficult than installing a normal application
Re: Micro-kernel
Look at An Overview of Monolithic and Micro Kernels at my website under Docs and Tutorials:
http://surf.to/osdev
K.J.
http://surf.to/osdev
K.J.
Re: Micro-kernel
Hi,
Your site seems to be off-line...
But thanks to everybody for responding...
Jeroen Jacobs
Your site seems to be off-line...
But thanks to everybody for responding...
Jeroen Jacobs
Re: Micro-kernel
Hmm, my web host does seem to be down. Hopefully they'll be back up in a hour or two.
K.J.
K.J.
Re: Micro-kernel
In a microkernel, the FS and MM correspond by sending messages. To produce and send these messages is the job of the lower layer.