📜  微内核和单片内核的区别

📅  最后修改于: 2021-09-14 01:20:20             🧑  作者: Mango

什么是内核?
内核是处于计算机操作系统核心的计算机程序,对系统中的一切具有完全控制权。它管理计算机和硬件的操作。
有五种类型的内核:

  1. 一个微内核,只包含基本功能;
  2. 单片内核,其中包含许多设备驱动程序。
  3. 混合内核
  4. 外核
  5. 纳米核

但在本教程中,我们将只研究微内核和单片内核。

1.微内核
内核管理计算机的操作,在微内核中,用户服务和内核服务在不同的地址空间中实现。用户服务保存在用户地址空间,内核服务保存在内核地址空间。

2.单片内核
在单片内核中,整个操作系统在内核模式下作为单个程序运行。用户服务和内核服务在相同的地址空间中实现。

微内核和单片内核的区别:

Microkernel

Monolithic kernel

In microkernel user services and kernel, services are kept in separate address space.

In monolithic kernel, both user services and kernel services are kept in the same address space.

OS is complex to design.

OS is easy to design and implement.

Microkernel are smaller in size.

Monolithic kernel is larger than microkernel.

Easier to add new functionalities.

Difficult to add new functionalities.

To design a microkernel, more code is required.

Less code when compared to microkernel

Failure of one component does not effect the working of micro kernel.

Failure of one component in monolithic kernel leads to failure of entire system.

Execution speed is low.

Execution speed is high.

It is easy to extend Microkernel.

It is not easy to extend monolithic kernel.

Example : Mac OS X.

Example : Microsoft Windows 95.