💻

Overview of Operating System Structures

Oct 13, 2024

Lecture: Structures of Operating Systems

Introduction

  • Discussion on operating system structures.
  • Importance of engineering operating systems for functionality and easy modification.
  • Historical evolution of OS structures.

Simple Structure

  • Used by: Early operating systems, e.g., MS-DOS.
  • Characteristics:
    • Not well-defined structure.
    • Layers include ROM/BIOS, device drivers, system programs, and application programs.
    • Direct access to base hardware by all upper layers.
  • Disadvantages:
    • Vulnerable to system crashes due to errant programs accessing hardware.
    • Lack of hardware protection and dual-mode in early processors like Intel 8088.

Monolithic Structure

  • Used by: Early Unix systems.
  • Characteristics:
    • Kernel contains all functionalities (signal handling, file systems, CPU scheduling, etc.).
    • Users and system call interfaces above kernel, hardware below.
  • Disadvantages:
    • Difficult to maintain and debug due to packed functionalities.
    • Changes require modifying the entire kernel.

Layered Structure

  • Characteristics:
    • Divides OS into layers (hardware at layer 0, user interface at the topmost layer).
    • Functions are separated into different layers.
  • Advantages:
    • Easier to implement and debug.
    • Hardware protection from upper layers.
  • Disadvantages:
    • Complex to design specific layer order.
    • Efficiency loss due to layered communication (service requests passing through multiple layers).

Microkernels

  • Characteristics:
    • Minimizes kernel by removing non-essential components.
    • Core functionalities remain in the kernel; other services implemented as system programs.
    • Communication through message passing.
  • Advantages:
    • Core functionalities in user mode minimize system crashes.
  • Disadvantages:
    • Potential performance decrease due to overhead from frequent message passing.

Modular Structure

  • Current best methodology for OS design.
  • Characteristics:
    • Core kernel with essential functionalities.
    • Use of loadable modules for additional functionalities (device drivers, file systems, etc.).
  • Advantages:
    • Flexible, defined interfaces.
    • Modules can communicate directly, unlike layered systems.
    • Avoids message passing overhead seen in microkernels.
    • Combines benefits of both layered and microkernel approaches.