zoukankan      html  css  js  c++  java
  • OS | monolithic kernel & microkernel

    A monolithic kernel is a kernel where all services (file system, VFS, device drivers, etc) as well as core functionality (scheduling, memory allocation, etc.) are a tight knit group sharing the same space. This directly opposes a microkernel.
    A microkernel prefers an approach where core functionality is isolated from system services and device drivers (which are basically just system services). For instance, VFS (virtual file system) and block device file systems (i.e. minixfs) are separate processes that run outside of the kernel's space, using IPC to communicate with the kernel, other services and user processes. In short, if it's a module in Linux, it's aservice in a microkernel, indicating an isolated process.
    Do not confuse the term modular kernel to be anything but monolithic. Some monolithic kernels can be compiled to be modular (e.g Linux), what matters is that the module is inserted to and runs from the same space that handles core functionality.
    The advantage to a microkernel is that any failed service can be easily restarted, for instance, there is no kernel halt if the root file system throws an abort.
    The disadvantage to a microkernel is that asynchronous IPC messaging can become very difficult to debug, especially if fibrils are implemented. Additionally, just tracking down a FS/write issue means examining the user space process, the block device service, VFS service, file system service and (possibly) the PCI service. If you get a blank on that, its time to look at the IPC service. This is often easier in a monolithic kernel. GNU Hurd suffers from these debugging problems (reference). I'm not even going to go into checkpointing when dealing with complex message queues. Microkernels are not for the faint of heart.
    The shortest path to a working, stable kernel is the monolithic approach. Either approach can offer a POSIX interface, where the design of the kernel becomes of little interest to someone simply wanting to write code to run on any given design.

    Linux: monolithic kernel 

    XP: microkernel; 

    By the time Windows XP was designed, Windows architecture had become more monolithic than microkernel.

    both Linux and Solaris are monolithic, because having the operating system in a single address space provides very efficient performance.However, they are also modular, so that new functionality can be dynamically added to the kernel. Windows is largely monolithic as well (again primarily for performance reasons), but it retains some behavior typical of microkernel systems, including providing support for separate subsystems (known as operating-system personalities) that run as user-mode processes. Windows systems also provide support for dynamically loadable kernel modules.

  • 相关阅读:
    TCO 2013 2A
    matlab 中的fmincon参数设定问题
    一步步写自己SqlHelper类库(四):Connection对象
    珠海立方科技实习总结
    Web Services 应用开发学习笔记(三):XML模式定义
    C#笔记(一):类型,泛型,集合
    Web Services 应用开发学习笔记(二):XML文档类型定义
    一步步写自己SqlHelper类库(三):连接字符串
    一步步写自己SqlHelper类库(二):.NET Framework 数据提供程序
    (Joomla)多功能健康模块
  • 原文地址:https://www.cnblogs.com/linyx/p/3791980.html
Copyright © 2011-2022 走看看