operating-systems

Definition

Operating System

An Operating System (OS) is system software acting as an intermediary between the user and computer hardware, enabling program execution by abstracting the underlying architecture.

Two primary functions:

  1. Extended Machine: Provides abstractions (processes, files, address spaces) hiding hardware complexity

  2. Resource Manager: Controls allocation of processors, memory, and I/O devices among competing programs

The OS Illusion

The OS creates the illusion that a program has exclusive access to hardware (infinite memory, dedicated processor) by multiplexing resources in time (scheduling) and space (virtual memory).

Control Structures

Resource Tables

The kernel maintains control structures to manage system resources:

  • Memory Tables: Track main/secondary memory allocation, protection, and virtual memory mapping
  • I/O Tables: Manage devices, channels, and pending transfers
  • File Tables: Store file locations, status, and metadata
  • Process Tables: Central structures for active processes, each pointing to a PCB

Interfaces

Instruction Set Architecture (ISA)

Boundary between hardware and software. Defines machine code instructions, registers, and memory addressing.

Application Binary Interface (ABI)

Standard for binary portability across OS instances on the same architecture (e.g., system call conventions).

Application Programming Interface (API)

High-level language interface (e.g., POSIX, Win32) allowing developers to access OS services through library calls.

Roles

Extended Machine

Provides abstraction hiding hardware complexity:

  • Program execution
  • I/O operations
  • File system access
  • Communication (IPC, networking)
  • Error detection

Resource Manager

Manages competition for limited hardware resources:

  • Processor: Time allocation (scheduling)
  • Memory: Space allocation (paging/segmentation)
  • I/O Devices: Access control and queuing
  • Data: Shared files and buffers

Evolution

Serial Processing (1950s)

No OS. Users had exclusive access. Input via console switches and punch cards. Error-prone with significant setup time.

Simple Batch Systems (1960s)

Monitor software managed job execution via JCL. Required memory protection, timers, interrupts, and privileged instructions.

Multiprogramming (1965)

Multiple processes in memory. When one waits for I/O, CPU switches to another, bridging CPU/IO speed gap.

Time-Sharing (1970s)

Multiple interactive users via preemptive scheduling. Led to complex file systems.