Skip to content

Latest commit

 

History

History
54 lines (47 loc) · 3.19 KB

00.OS goals and definitions.md

File metadata and controls

54 lines (47 loc) · 3.19 KB

OS goals and definitions

The main definition, goals, and techniques of an Operating System (OS) are:

  • Resource Management:
    • Ensures programs are created and run as if they had individual resource allocations.
    • Manages resources like CPU(s), memory, and disk.
    • Achieved through:
      • Multiplexing the CPU: Increases CPU utilization and reduces latency by allowing running another program when one is blocked, using preemption and context switches.
      • Process Management: Manages process states, indicating what a process can or can't do and the resources it uses. - Includes process control blocks containing PID, process context, virtual memory mappings, open files, credentials, signal handling info, priority, and accounting statistics.
  • Isolation and Protection:
    • Enforces isolation for reliability.
    • Regulates access rights to resources (e.g., memory) to prevent conflicts and unauthorized data access.
    • Achieved through:
      • Memory Management: Utilizes a Virtual Address Space (VAS) where a program's memory locations are typically isolated but may share protected portions.
      • Employs virtual memory areas, some representing on-disk program data and others built dynamically.
      • Implements paging to extend physical memory's apparent abundance to processes
  • Portability of Applications:
    • Uses Interface/Implementation abstractions to hide hardware complexity.
    • Ensures applications work on different systems with varying physical resources.
  • Extensibility:
    • Creates uniform interfaces for lower layers, allowing reuse of upper layers (e.g., device drivers).
    • Hides complexity associated with different peripheral models and variants.

Architectures of OSs

The design of operating systems can encompass various architectural approaches, each with its unique characteristics:

  1. No OS - Bare Metal Programming:
    • Direct hardware manipulation without any OS layer.
    • Often used in very simple or highly specialized embedded systems.
  2. Monolithic with Modules:
    • Single large kernel binary.
    • Device drivers and kernel code reside in the same memory area.
    • Modules enhance flexibility.
    • Examples: Linux, Embedded Linux, AIX, HP-UX, Solaris, *BSD.
  3. Micro-kernel:
    • Minimal core kernel components.
    • External modules for additional services.
    • Non-essential components as user-space processes.
    • Resilient to system process crashes.
    • Examples: SeL4, GNU Hurd, MINIX, MkLinux, QNX, Redox OS.
  4. Hybrid:
    • Combines micro-kernel design with additional in-kernel code.
    • Certain services (e.g., network stack, filesystem) run in kernel space.
    • Device drivers typically run in user space.
    • Examples: Windows NT, 2000, XP, Vista, 7, 8, 8.1, 10, macOS.
  5. Library OS:
    • Provides OS services via libraries compiled with the application.
    • An Unikernel approach for cloud or embedded environments (RTOSes).
    • Examples: FreeRTOS, IncludeOS, MirageOS.

Each architecture offers different benefits and trade-offs, influencing the performance, stability, and complexity of the OS and the applications it supports. The choice of architecture depends on the specific requirements of the system it's designed to run on.