What is the difference between monolithic and microkernel?

Can someone explain the difference in examples between monolithic and microkernel? Other kernel classifications?

+83
language-agnostic terminology kernel
Dec 27 '10 at 9:52
source share
6 answers

A monolithic kernel is one large process that works completely in one address space. This is one static binary. All kernel services exist and run in the kernel address space. The kernel can call functions directly. Examples of monolithic kernel OSs: Unix, Linux.

In microkernels, the kernel is broken down into separate processes known as servers. Some of the servers run in kernel space, and some run in user space. All servers are stored separately and run in different address spaces. Servers call "services" from each other, sending messages through IPC (Interprocess Communication). This separation has the advantage that if one server fails, other servers can work efficiently. Examples of microkernel-based operating systems: Mac OS X and Windows NT.

+90
Mar 04 2018-11-11T00:
source share

1 ) The monolithic core is much older than Microkernel, the idea was conceived in the late 1980s.

2 ) Monolithic kernels are used in Unix and Linux. Microkernels are used in QNX, L4 and HURD. It was originally used on Mach (not Mac OS X), but was later converted to a hybrid kernel. Even Minix is ​​not a clean kernel, because device drivers are compiled as part of the kernel.

3 ) Monolithic kernels are faster than micronuclei. The first Mach microkernel was 50% slower than the monolithic core, and a later version such as L4 was only 2% or 4% slower than the monolithic core.

4 ) Monolithic kernels are usually bulky. Pure Microkernel must be small in order to fit into the cache of the L1 processor (first-generation microkernel).

5 ). In monolithic kernels, device drivers are in kernel space, and in Microkernel, device drivers are in user space.

6 ). Since the device driver is located in the kernel space, it makes the monolithic kernel less secure than the microkernel, and a failure in the driver can lead to failure. Microkernels are safer than monolithic cores, so they are used in some military devices.

7 ). Monolithic kernels use signals and sockets to provide IPC, while the microkernel approach uses message queues. First-generation micronuclei, poorly implemented by IPC, were slow in context switching.

8 ) Adding a new function to a monolithic system means recompiling the entire kernel, while using micronuclei you can add new functions or patches without recompiling.

+55
Feb 02
source share

Monolithic core

All parts of the kernel, such as Scheduler, File system, Memory management, Network stacks, Device drivers, etc., are supported in one unit inside the kernel in the Monolithic kernel

<strong> Benefits

• Faster processing

disadvantages

• Security bug • Port rigidity • Kernel size explosion

<strong> Examples • MS-DOS, Unix, Linux

Microkernel

Only very important components are placed in the kernel, such as IPC (Inter process Communication), basic scheduler, basic memory processing, basic input-output primitives, etc. Communication takes place through messaging. Others are supported as server processes in user space.

<strong> Benefits

• Resistance to failures, transfer, smaller size

disadvantages

• Slower processing due to additional skipping messages

<strong> Examples • Windows NT

+18
Jun 22 '13 at 2:09 on
source share

1. Monolithic core (purely monolithic): all

  • All kernel services from one component

    (-) addition / removal is not possible, no / Zero flexible

    (+) inter Component Communication is better

e.g .: - Traditional Unix

Kernel 2.Micro: few

  • several services (memory management, CPU management, IPC, etc.) from the main core, other services (file management, I / O control, etc.) from different layers / components

  • Split approach [Some services are in privileged (kernel) mode, and some of them are in normal (user) mode]

    (+) flexible for change / up gradation

    (-) communication overhead

for example: - QNX, etc.

3.Modular core (modular monolithic): most

  • The combination of micro- and monolithic core

  • Module collection - modules can be → Static + Dynamic

  • Drivers are supplied as modules

e.g.: - Modern Linux OS

+11
Dec 29 '15 at 12:36
source share

In the spectrum of nuclear structures, the two extreme points are monolithic nuclei and micronuclei.

(classic) Linux The kernel, for example, is a monolithic kernel (and, therefore, every commercial OS today, although they may require different);

In that its code is a single C file, giving rise to a single process that implements all of the above Services.
To illustrate the encapsulation of the Linux kernel, we note that the Linux kernel does not even have access to any of the standard C libraries. In fact, the Linux kernel cannot use the rudimentary functions of the C library, such as Printf. Instead, it implements its own print function (called print).

This privacy of the Linux kernel and self-condensation provide the Linux kernel with its main advantage: the kernel is in the same address space1, which allows all the possibilities for communication in the fastest way, without resorting to any type of message transfer. In particular, a monolithic kernel implements all device device drivers.

However, this is the main disadvantage of a monolithic kernel: The introduction of any new unsupported equipment requires rewriting the kernel (in the appropriate parts), recompiling it, and reinstalling the entire OS.
More importantly, if any device driver fails, the entire kernel suffers as a result. This non-modular approach to hardware additions and hardware failures is the main argument in support of another extreme design approach for kernels. The microkernel in a sense is a minimalist core, only the most basic OS services (for example, process management and file system management). In the microkernel, device drivers lie outside the kernel, allowing you to add and remove device drivers while the OS is running and do not require any kernel changes.

0
Jun 06 '17 at 19:29
source share

A monolithic kernel has all the services of the kernel along with the main part of the kernel, so they are heavy and have a negative impact on speed and performance. On the other hand, the microkernel is lightweight, which leads to an increase in performance and speed. I answered the same question on wordpress. For the difference between monolithic, micronuclei and exokernel in tabular form, you can visit here

0
Dec 15 '17 at 6:39
source share



All Articles