O fato do Linux ter kernel com núcleo monolítico

1. O fato do Linux ter kernel com núcleo monolítico

Will D. Magno
Zoma

(usa Manjaro Linux)

Enviado em 01/03/2018 - 05:39h

é um ponto negativo ou positivo? Vi uma pessoa dizendo que um falha nessa área pode gerar um congelamento geral no sistema.

Alguém com conhecimentos avançados no linux pode me explicar isso?


  


2. Re: O fato do Linux ter kernel com núcleo monolítico

Stanislaus K
StanislausK

(usa FreeBSD)

Enviado em 01/03/2018 - 10:16h

Ola,

existe farta discussão sobre isso. Segue alguns textos:

Is Linux kernel design outdated?
(de Jim Lynch)
Link: https://www.infoworld.com/article/3195147/linux/is-linux-kernel-design-outdated.html

ExoticMandibles: ""Outdated"? No. The design of the Linux kernel is well-informed regarding modern kernel design. It's just that there are choices to be made, and Linux went with the traditional one.

The tension in kernel design is between "security / stability" and "performance". Microkernels promote security at the cost of performance. If you have a teeny-tiny minimal microkernel, where the kernel facilitates talking to hardware, memory management, IPC, and little else, it will have a relatively small API surface making it hard to attack. And if you have a buggy filesystem driver / graphics driver / etc, the driver can crash without taking down the kernel and can probably be restarted harmlessly. Superior stability! Superior security! All good things.

The downside to this approach is the eternal, inescapable overhead of all that IPC. If your program wants to load data from a file, it has to ask the filesystem driver, which means IPC to that process a process context switch, and two ring transitions. Then the filesystem driver asks the kernel to talk to the hardware, which means two ring transitions. Then the filesystem driver sends its reply, which means more IPC two ring transitions, and another context switch. Total overhead: two context switches, two IPC calls, and six ring transitions. Very expensive!

A monolithic kernel folds all the device drivers into the kernel. So a buggy graphics driver can take down the kernel, or if it has a security hole it could possibly be exploited to compromise the system. But! If your program needs to load something from disk, it calls the kernel, which does a ring transition, talks to the hardware, computes the result, and returns the result, doing another ring transition. Total overhead: two ring transitions. Much cheaper! Much faster!

In a nutshell, the microkernel approach says "Let's give up performance for superior security and stability"; the monolithic kernel approach says "let's keep the performance and just fix security and stability problems as they crop up." The world seems to accept if not prefer this approach."


- Outros links interessantes:

How does Linux kernel compare to microkernel architectures?
Link: https://unix.stackexchange.com/questions/6409/how-does-linux-kernel-compare-to-microkernel-architect...

Why is Linux called a monolithic kernel?
Link: https://stackoverflow.com/questions/1806585/why-is-linux-called-a-monolithic-kernel

A new (old) debate. Microkernel versus Monolithic kernel.
Link: https://arstechnica.com/civis/viewtopic.php?t=881948

What is meant by "Linux has a monolithic kernel?"
Link: https://www.quora.com/What-is-meant-by-Linux-has-a-monolithic-kernel

What are monolithic and micro kernels and what are the differences between them?
Link: http://learnlinuxconcepts.blogspot.com.br/2014/03/what-are-monolithic-and-micro-kernels.html







Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts