Roger Fan

Notes

High School Notes
University Notes
Computer Networking
Algorithm
Ch1 Algorithm Complexity and Sorting
Ch2 Greedy Method
Ch3 Divide and Conquer
Ch4 Tree Search Stategies
Ch5 Prune and Search
Ch6 Dynamic Programming
Ch7 The Theory of NP-Completeness
Computer Architecture
Operating System
Chapter 0
Chapter 1: Operating System Introduction
Chapter 2: OS Structure
Chapter 3: Process Concept
Chapter 4: Multithreaded Programming
Chapter 5: Process Scheduling
Chapter 6: Process Synchronization
Chapter 7: Deadlocks
Chapter 8: Memory Management
Chapter 9: Virtual Memory Management
Chapter 10: File System Interface
Chapter 11: File System Implementation
Chapter 12: Mass Storage System
Chapter 13: IO System
Discrete Math
Calculus
Calculus I
Calculus II
Linear Algebra
Probability
General Physics
General Education
Tech Notes
TMUX
SSH
Fail2ban
SSHD
UFW
DNS Bind9
Notes
University Notes
Operating System
Chapter 0

Chapter 0

Created: 2025-12-16
Updated: 2025-12-16
roger@roger.tw
roger@roger.tw
© 2026 Roger Fan. All rights reserved.

Mainframe Systems

  • the earliest large-scale computers
    • physically massive, often occupying entire rooms
    • IO very slow, such as card readers, tape drives, and line printers
  • Nowadays def: a large system designed for particular tasks, running with massive amounts of data for large organizations like banks, airlines, and government agencies
    • reliability, security, and high-throughput
    • bulk data processing, enterprise resource planning (ERP), and handling billions of real-time transactions
  • The Three Stages of Evolution:

Batch Systems

  • Process
    • users submit jobs (programs and data) to operators
    • operators sort jobs manually (with similar needs) into batches
    • OS simply runs each job sequentially (no decision-making)
  • Features
    • One job at a time
    • no user interaction
    • CPU is often idle, waiting for slow IO devices

Multiprogramming Systems

  • Overlaps CPU and I/O → ↑ CPU utilization
  • Spooling: Simultaneous Peripheral Operations On-Line
    • It's only a concept ← implemented by interrupt
    • I/O is done with no CPU intervention
    • CPU just be notified when I/O is done

Time-Sharing Systems

  • interactive: provide direct communication between user and system
  • users: share the CPU simultaneously
FeatureBatchMultiprogrammingTime-Sharing
System Modelsingle user, single jobmultiple prog.multiple users, multiple prog.
Purposesimpleresource utilizationinteractive response time
OS featureN/ACPU scheduling, memory managementfile system, virtual memory, sync, deadlock

Computer system architecture

Desktop Systems: Personal Computer

  • convenience and responsiveness -- GUI
  • I/O devices
  • lack of OS protection from users

Multiprocessor Systems -- Tightly Coupled System -- Parallel Systems

  • multiple CPUs communicate through shared memory
  • purpose: ↑ throughput, economical, ↑ reliability
  • SMP (Symmetric Multiprocessing System) -- most popular
    • each processor runs the same OS
    • require extensive sync to protect data integrity
  • Asymmetric Multiprocessing System
    • each processor is assigned a specific task
    • one master CPU & multiple slave CPUs
    • for extremely large systems
  • Multi-core Processors
    • on-chip communication is faster than between-chip communication
    • problem: different core have different cache
  • Many-core Processors
    • hundreds or thousands of cores
    • e.g. GPU (Graphics Processing Unit)
  • Memory Access Architecture
    • UMA (Uniform Memory Access): all processors share the same physical memory uniformly
      • identical access time
    • NUMA (Non-Uniform Memory Access): each processor has its own local memory, but can also access memory owned by other processors (higher latency)
      • non-uniform access time

Distributed Systems -- Loosely Coupled System

  • communicate through I/O bus or network
  • easy to scale to large # of nodes
  • purpose: resource sharing, load sharing, reliability
  • architecture:
    • client-server model: easy to manage but bottleneck and single point of failure
    • peer-to-peer model: each node has equivalent capabilities and responsibilities
  • Clustered Systems
    • multiple systems connected through a high-speed network (e.g. Infiniband)
  • Supercomputers
    • performance measured in FLOPS (Floating Point Operations Per Second), not MIPS (Million Instructions Per Second)

Special-Purpose Systems

  • Real-Time OS
    • Keep deadline: guarantee response time for critical tasks
    • Soft real-time: best-effort to meet deadlines -- priority (e.g. multimedia)
    • Hard real-time: must meet deadlines (no/limited secondary storage) (e.g. nuclear power plant)
  • Multimedia Systems
    • a wide range of app: audio, video ...
    • timing constraints: 24~30 fps
    • on-demand/live streaming: played but not stored
    • compression/decompression
  • Handheld/Embedded Systems
    • specialized OS for small devices
    • constraints: limited memory, low power consumption, small display, simple I/O
  • Heterogeneous Computing
    • different types of computing units (DSP, FPGA, GPU, CPU ...)
  • HSA (Heterogeneous Systems Architecture)
    • unified memory address space for all computing units
    • eliminate data copying between different memories
  • Single core → Multi-core → Many-core (tightly) | (loosely) Cluster → Distributed