A microkernel is the minimum software that is required to correctly implement an operating system. This includes memory, process scheduling mechanisms and basic inter-process communication.
A diagram that demonstrates the architecture of a microkernel is as follows:
In the above diagram, the microkernel contains basic requirements such as memory, process scheduling mechanisms and basic interprocess communication. The only software executing at the privileged level i.e. kernel mode is the microkernel. The other functions of the operating system are removed from the kernel mode and run in the user mode. These functions may be device drivers, file servers, application interprocess communication etc.
The microkernel makes sure that the code can be easily managed because the services are divided in the user space. This means that there is less code running in the kernel mode which results in increased security and stability.
A microkernel contains only the core functionalities of the system. A component is included in the microkernel only if putting it outside would disrupt the functionality of the system. All the other non-essential components are put in the user mode.
The minimum functionalities included in the microkernel are:
Providing services in a microkernel system are much more expensive than in a normal monolithic system. The service is obtained by sending an interprocess communication message to the server and getting one in return. This means a context switch or a function call if the drivers are implemented as processes or procedures respectively.
So performance can be complicated in microkernel systems and may lead to some problems. However, this issue is reducing in the modern microkernel systems created such as L4 microkernel systems.
Some of the benefits of microkernels are: