\xa0
\xa0
Monolithic Kernel
\xa0
A monolithic kernel is a framework of an operating system that has all the privileges to access input/output (I/O) devices, memory, hardware interrupts, and the CPU stack. Monolithic kernels tend to be larger (it is programmed in a non-modular way and can be of considerable size) than other kernels because they deal with many aspects of computer processing at the lowest level and therefore have to incorporate code that interacts with many devices, I/O and interrupt channels, and other hardware operators.
This form of kernel is the basis for Linux, Unix, MS-DOS, and Mac OS. Newer operating systems generally use a hybrid kernel to allow for easier maintenance and improvements to the operating system.
All functional components of the kernel have access to all its internal data structures and routines. Therefore, an error in a routine could propagate to the entire system.
The alternative is to have a microkernel structure, where functional parts are divided into separate units with strict communication mechanisms between them. The downside of microkernel systems is their poor performance due to the constant passing of messages between different services.
Monolithic kernels retain full privilege access over the various components under their control. These include:
- File systems
- Inter-process communication
- I/O and device management
- Fundamental process management.
- Hardware
The reason newer kernel architectures, such as the microkernel or hybrid kernel design, are preferred is that the larger the kernel becomes, the more functions it must assume. This makes the code cumbersome and slower to load. Another drawback of the monolithic kernel design is that the kernel code must be modified to add features, correct errors, etc. This can mean a complete update of the operating system, which is more costly.
\xa0
\xa0
Microkernel
\xa0
A microkernel (microkernel or μkernel) is a type of operating system kernel that provides a set of minimal primitives or system calls to implement basic services, such as address spaces, communication between processes, and basic scheduling.
All other services (memory management, file system, I/O operations, etc.), which are generally provided by the kernel, run as user-space server processes.
Only the absolutely essential functions of the operating system kernel should remain in the microkernel.
Some tasks of the microkernel:
- Handling interruptions in the system, from physical devices.
- Handles processor exceptions.
- Provides support for recovering a system with some power failure failure.
The main advantages of its use are the reduction of complexity, the decentralization of failures, and the ease of creating and debugging device drivers, which improves fault tolerance and elevates portability between hardware platforms.
Some operating systems with microkernels:
- AIX
- AmigaOS
- Amoeba
- Minix
- Hurd
- MorphOS
- L4
- Netkernel
- RaOS
- RadiOS
- ChorusOS
- QNX
- SO3
- Symbian
- SymbOS
- Zircon
- AmayaOS
- RedoxOS
\xa0
Hybrid Kernel
\xa0
The hybrid kernel is an architecture that is based on a combination of the microkernel and monolithic kernel architectures. This kernel approach combines the speed and simpler design of the monolithic kernel with the modularity and security of execution of the microkernel.
Basically, it is a microkernel that has some «non-essential» code in kernel space, so that it runs faster than it would if it were in user space.
A hybrid kernel runs some services in kernel space to reduce the performance overhead of a traditional microkernel, while still running kernel code as user-space servers. For example, a hybrid kernel design may keep virtual file systems and bus controllers within the kernel and file system controllers and storage controllers as user-mode programs outside the kernel. Such a design maintains the performance and design principles of a monolithic kernel.
Examples of OS with hybrid kernels
- Microsoft Windows NT, used in all systems that use the Windows NT codebase
- XNU (used in Mac OS X)
- DragonFlyBSD
- ReactOS
\xa0
\xa0