Jump to content

Operating system/Kernel models

From Wikiversity

Introduction

The kernel is the name given to the program that does most of the housekeeping tasks for the operating system. The boot loader hands control over to the kernel, which initializes the various devices to a known state and makes the computer ready for general operation.

After preparing the hardware for use, the kernel provides an abstraction layer between the hardware and software running on the system. Through an API, or application programming interface, software can request the kernel to perform hardware tasks, as well as access many common functions. Most current kernels also multi-task the hardware, sharing it between the various processes running on the system.

Monolithic Kernel

Graphical overview of a Monolithic kernel

Design

Search for Monolithic kernel on Wikipedia.

Monolithic Kernels function with all of the kernel and device drivers inside one address space running in kernel mode. The principle advantage to this approach is efficiency (especially on x86 architectures where a task switch is a particularly expensive operation). Unfortunately, monolithic kernels suffer the risk of the entire system crashing due to a bug in a device driver.

Pros

  • Speed
  • Simplicity of design

Cons

  • Potential stability issues
  • Can become huge - Linux 2.6 has 7.0 million lines of code
  • Potentially difficult to maintain

Examples

  • Traditional Unix kernels (includes BSDs and Solaris)
  • Linux
  • MS-DOS, Windows 9x
  • Mac OS versions below 8.6


Microkernel

Graphical overview of a microkernel

Design

Search for Microkernel on Wikipedia.

A Microkernel tries to run runs most of it's services and device drivers in userspace. This can result in an increase in stability and possibly security on machines with an Memory Management Unit.

Pros

  • Stability
  • Security
  • Potentially more responsive (though often not in practice)
  • Benefits for SMP machines

Cons

  • Additional context switches are usually required
  • Slow Inter Process Communication can result in poor performance

Examples

  • AmigaOS
  • Amoeba
  • Mach
  • Minix
  • L4
  • QNX

Hybrid kernel

Graphical overview of a hybrid kernel

Design

Search for Hybrid kernel on Wikipedia.

A hybrid kernel combines the concepts of both monolithic kernels and microkernels. It is generally implemented by having a monolithic kernel with a more microkernel like design. When properly implemented it is hoped that this will result in the performance benefits of a monolithic kernel, with the stability of a Microkernel

Examples

  • NT kernel (also used in 2000, XP, and vista)
  • Darwin (Mac OS X's kernel)
  • DragonFly BSD
  • BeOS
  • Plan 9