Types of Kernels

Exploring The Linux Kernel - Part 2


In the previous post we discussed very generally what a kernel is and what it does. In this post we will discuss different types of kernels and the different aspects of kernel design

One of the biggest differentiating factors in a kernel is how the kernel tasks are divided and handled. There are 2 main classes of kernels called Monolithic kernels and Micro kernels and their differences come in the form of differing philosophies on "The Separation of Mechanism and Policy". 

Here a policy is something that needs to be done for a particular task, and a mechanism is the way to do it. An example of a policy is when an operating system needs to decide how to give memory to the most important process first. An example of a mechanism is implementing this policy with a priority queue.

A Micro kernel uses separation of policy and mechanism by providing a few general and simple polices. It then allows the users to create systems such as drivers or file system handlers outside of the kernel. In a Micro kernel these systems are contained within "servers" which use the kernel to communicate between one another and other pieces of software running on the Operating System.
An example of the micro Kernel architecture.


On the other hand a Monolithic kernel has a large, rich set of policies and requires that all the software running above the kernel use it. In this design approach the kernel contains everything that is required to perform every kernel related task. This includes components such as Device drivers, Scheduler, Memory handling,  File systems,  Network stacks.


Some examples of  Monolithic and Micro kernels

Monolithic Kernel
BSD
Linux
Solaris
Micro Kernels
MINIX
GNU
Hydra


While monolithic vs Micro is one of the biggest differentiators when it comes to kernel design there are many other attributes that define how a kernel behaves. Some kernels have integrated security features like firewalls. Some have something called virtualization which is when a system takes a resource that can't be shared such as a memory, and makes virtual copies of it so different parts of the system don't know they are sharing the same resource (more on this later).

A great resource comparing different types of kernels can be found on wikipedia here.

Now that we know some basic information about what a kernel is and what defines a particular kernel, we will look at the linux kernel in particular and examine what makes it so great.


This is a blog series on the linux kernel; why it's important, what it does it, and how it does it.
The first post in this series can be found here Part 1 - The Kernel  
The next post in this series can be found here Part 3 - The Linux Kernel Source Tree

No comments:

Post a Comment