Abstract


Loose Coupling

Software doesn’t need to know the complexity of hardware. It can use the hardware thought a standard interface called System Call (系统调用)

Common Modern Kernels

Preemptive Kernel

Avoid Kernel Hogging

Prevent kernel from hogging the CPU that slows down user space process

Kernel Module

  • Known as Kernel Extension in the context of MacOS and IOS
  • Extend the functionality of the Kernel
  • FUSE is a kernel Module for example

Application of Kernel Module in Linux

The functionalities of the Linux Kernel is group into different Kernel Modules which can be either disabled, enabled or rendered toggle-able at compile-time

We also able to add/remove/disable Kernel Modules during runtime using the modprobe command

Kernel Booting


  1. Get configuration info from BIOS
  2. Check for missing Device Driver
  3. Start up Init System
  4. Initialise Page Table
  5. Starts up OS System Program
  6. OS is booted up and ready to be used by the User

Kernel Architecture


Micro Kernel Architecture

Fault-tolerant

If one of the kernel Process (进程) crashes, this doesn’t crash the entire system

Less Performant

Due to the overhead of communication between different modules

Components of Traditional Microkernel

Monolithic Kernel Architecture

  • By far, the most common Kernel architecture, used by Linux Kernel
  • The entire kernel runs as a single program in Kernel Mode
  • Consist of a collection of Procedures, linked together into a single large executable binary program. Each Procedures in the system is free to call any other one

Performant

No much overhead to call any of the kernel procedures

Harder to Maintain

Thousands of procedures that can call each other without restriction may also lead to a system that is difficult to understand

Not So Fault-tolerant

A crash in any of these Procedures will take down the entire Kernel