What are the differences between Kernel and Micro-Kernel?

7

Studying about Sistemas Operacionais I came across concepts about kernel and micro-kernel . In my searches I found the following settings:

Kernel

  

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

Source: Wikipedia

Micro-Kernel

  

Micronucleus , or microkernel , is a kernel architecture of   an operating system whose functionalities are almost all executed   outside the nucleus, as opposed to a monolithic nucleus. The processes are   communicate with a minimal core, using as little space as possible.   kernel space. "At this location applications have access to all   the instructions and all the hardware and leaving the maximum resources   running on 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 p>

What are the main differences between the two in practice? What are the advantages / disadvantages of each other?

    
asked by anonymous 24.02.2016 / 12:19

2 answers

10

Settings

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

Microkernel is a specific type of kernel . Perhaps the question would be better if it were the difference between a monolithic and microkernel . While the monolithic tries to put all major operating system functions within the kernel , within a special process that has several privileges, the microkernel try to put only what is necessary and leave everything that does not need to be in the core as ancillary services in different processes and without special privileges.

Monolithic usually perform better because it makes fewer context changes. By having privileged access to many functions, you can run more efficiently.

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

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

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

Examples

Linux is monolithic, 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 to do it and the necessary care in each one is that it can change. Some people consider Linux as a hybrid since although it is monolithic they have external kernel modules.

It is often difficult to define what is one or the other. In a way, all the more used ones end up being hybrids in some way.

Differences

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

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

This separation depends on the philosophy adopted by the product. It does not depend on where you are going to go, although obviously the place of use can affect your philosophy. There are full-featured operating systems, which even GUI is in the kernel and fit on a floppy disk.

    
24.02.2016 / 12:42
2

In practice, it depends more on the application.

If you are going to work with a desktop PC, it is worth having all the features of a complete kernel or even consider supporting a number of different systems for your application, and in that case full kernel support is recommended, since that people rarely use micro kernels on their PCs.

If you are going to create an embedded project, where you will guarantee the hardware and software ... Your job will be to optimize the solution for your application and then it 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, which ends up helping projects that use battery (if all the resources that it offers serve 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 the other solutions it provides is quite advantageous.

    
24.02.2016 / 12:28