Monolithic Kernel: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
m (Fixing categories)
m (BSD is not a single OS)
 
(7 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Template:Kernel designs}}

==Design==
==Design==
{|align="right"
[[Image:Monolithic.png|frame|right|Basic overview of a monolithic kernel.]]
|[[Image:Monolithic.png|frame|right|Basic overview of a monolithic kernel.]]
|}

A monolithic kernel includes all (or at least, most) of its services in the kernel proper.
A monolithic kernel includes all (or at least, most) of its services in the kernel proper.


This reduces the amount of context switches and messaging involved, making the concept faster than a [[Microkernel]]. On the downside, the amount of code running in kernel space makes the kernel more prone to fatal bugs.
This reduces the amount of context switches and messaging involved, making the concept faster than a [[Microkernel]]. On the downside, the amount of code running in kernel space makes the kernel more prone to fatal bugs.


The word "monolithic" by itself means a single piece (mono) that is of or like stone (lithic), however when applied to kernels the exact meaning is more general. Most people consider that a kernel where device drivers and services run as part of the kernel is a monolithic kernel, regardless of whether parts are dynamically loaded "kernel modules" or if everything is a true single unchangeable binary. For this reason I draw a distinction between "monolithic" and "pure monolithic".
The word "monolithic" by itself means a single piece (mono) that is of or like stone (lithic), however when applied to kernels the exact meaning is more general. Most people{{who}} consider that a kernel where device drivers and services run as part of the kernel is a monolithic kernel, regardless of whether parts are dynamically loaded "kernel modules" or if everything is a true single unchangeable binary. For this reason, a distinction can be drawn between "monolithic" and "pure monolithic".


Modern versions of Linux are a well-known example of a monolithic kernel - while drivers are shipped as dynamically loaded "kernel modules" they are still loaded into and running in kernel space. Monolithic kernels are common for the 80x86/PC architecture.
Modern versions of Linux are a well-known example of a monolithic kernel - while drivers are shipped as dynamically loaded "kernel modules" they are still loaded into and running in kernel space. Monolithic kernels are common for the 80x86/PC architecture.
Line 12: Line 17:


In general most OS's aren't "pure monolithic" or "pure micro-kernel", but fall somewhere between these extremes in order to make use of the advantages of both methods.
In general most OS's aren't "pure monolithic" or "pure micro-kernel", but fall somewhere between these extremes in order to make use of the advantages of both methods.

==Examples==
*Linux
*MSDOS, including Windows 9x (95, 98, Me)
*Mac OS <= 8.6
*Most BSDs
*[[Xv6]]


[[Category:Kernel]]
[[Category:Kernel]]

Latest revision as of 19:09, 5 October 2021

Kernel Designs
Models
Other Concepts

Design

Basic overview of a monolithic kernel.

A monolithic kernel includes all (or at least, most) of its services in the kernel proper.

This reduces the amount of context switches and messaging involved, making the concept faster than a Microkernel. On the downside, the amount of code running in kernel space makes the kernel more prone to fatal bugs.

The word "monolithic" by itself means a single piece (mono) that is of or like stone (lithic), however when applied to kernels the exact meaning is more general. Most people[who?] consider that a kernel where device drivers and services run as part of the kernel is a monolithic kernel, regardless of whether parts are dynamically loaded "kernel modules" or if everything is a true single unchangeable binary. For this reason, a distinction can be drawn between "monolithic" and "pure monolithic".

Modern versions of Linux are a well-known example of a monolithic kernel - while drivers are shipped as dynamically loaded "kernel modules" they are still loaded into and running in kernel space. Monolithic kernels are common for the 80x86/PC architecture.

Examples of "pure monolithic" kernels are rare for the 80x86/PC architecture (but more common in embedded systems). This is because of the wide variety of devices, hardware and CPU features that may be present within a modern PC - a pure monolithic kernel would need to be far too large or compiled specifically for the computer before use.

In general most OS's aren't "pure monolithic" or "pure micro-kernel", but fall somewhere between these extremes in order to make use of the advantages of both methods.

Examples

  • Linux
  • MSDOS, including Windows 9x (95, 98, Me)
  • Mac OS <= 8.6
  • Most BSDs
  • Xv6