What are the differences between Kernel and Microkernel?

Asked

Viewed 15,565 times

10

Studying about operating systems I came across concepts about kernel and microkernel. In my researches I found the following definitions:

Kernel

In computing, the core or core (in English: kernel) is the component central operating system of most computers; it serves as bridge between applications and actual data processing done at the level hardware. Core responsibilities include managing system resources (communication between hardware components and software).

Source: Wikipedia

Micromernel

Micronucleus, or microkernel, is a core architecture (kernel) of an operating system whose functionalities are almost all executed out of the core, as opposed to a monolithic nucleus. The proceedings if communicate with a minimum core, using as little as possible the "space of the system" (kernel space). At this location the apps have access to all instructions and all hardware and leaving maximum resources running in the "user space" (user space) where the software has some restrictions, not being able to access some hardware, nor have access to all instructions).

Source: Wikipedia

What are the main differences between them in practice? What are the advantages / disadvantages between them?

2 answers

12


Definitions

Kernel is a generic term and the definition is already in the question. It’s the core of the operating system, it’s what makes the basic things an operating system should do. It does not include auxiliary tools that are usually present in Sos to facilitate access to their functions.

Microkernel is a specific type of kernel. Maybe the question would be better if it was the difference between a kernel monolithic and a microkernel.

As the monolithic tries to put all major functions of the operating system within the kernel, within a special process that has several privileges, the microkernel tries to put only the necessary and leave everything that does not need to be in the central core as auxiliary services in different processes and without special privileges.

The monolithic usually performs better because it makes fewer context changes. By having privileged access in many functions can perform more efficiently.

The micronucleus (microkernel) tends to be more reliable and secure. A failure in auxiliary components does not bring down the entire operating system.

There are even other forms, such as exokernel or nanokernel, where the core really is minimal, and everything else goes to common applications.

There is also the unikernel that goes to the opposite side. In fact it works more like an operating library, since it does not have a user space to application is next to the kernel And it has the best performance, it’s usually even safer because it allows very little because it only has what the application needs, and it doesn’t let it interact in various ways because it’s not generic. It only has the minimum to give access to the hardware and facilitate the use, but it is not very flexible. Can not have errors under penalty of knocking down everything.

Examples

Linux is monolithic, the Minix is microkernel and Windows and OSX are hybrids. Obviously in practice it is possible to obtain more or less the same characteristics in any form. The way of doing and the necessary care in each one is that it can change. Some people consider Linux as hybrid since although it is monolithic it has external modules of kernel.

It is often difficult to define what one or the other is. In a certain way all the more used end up being hybrids somehow.

Differences

It is possible to solve the difficulties of each with specific techniques. There is a clear advantage of one over the other and there are huge debates about this. No one has unequivocally proven which is best, but by what we see the most commonly used operating systems for applications in general are hybrid, to a lesser or greater degree. Specific applications may benefit more than one type or another.

An example that differentiates one from the other is the filesystem. In a microkernel normally this is an isolated component, already in the monolithic it is part of the kernel. Drivers are other examples, whether they will be executed within the kernel or outside depends on the philosophy of kernel.

This separation depends on the philosophy adopted by the product. Regardless of where it will run, although obviously the place of use can affect your philosophy. There are operating systems with full cores, that even GUI is in the kernel, and fit on a floppy disk.

2

In practice, it depends more on the application.

If you are going to work with a Desktop PC, it is worth counting on all the features of a complete kernel or even considering support for several different systems for your application and in that case support for a complete kernel is recommended, since people hardly use micro kernel on their Pcs.

If you will create an embedded project, where you will ensure the hardware and software... Your job will be to optimize the solution for your application and then becomes relevant and the smaller kernel, which may have less overhead, lower cost and the controllers/processors that run this type of solution usually consume less energy, what ends up helping projects that use battery (if all the features it offers suit you well).

Generally, if you have the firepower to live with a full kernel, you will end up using it because the flexibility and support for other solutions it offers is quite advantageous.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.