Pre OS Era, Necessity of Operating Systems
Before operating systems, computers were programmed using physical switches, punch cards, and assembly language. Each program had complete control of the machine but also bore full responsibility for managing every hardware detail. This approach was viable when computers were rare, expensive, and ran one program at a time.
The Batch Processing Era
Early computers operated in batch processing mode. Operators would load a stack of punch cards containing a program and its data, run the job, and collect the output. Programs ran sequentially with no overlap. If a program needed to read a tape, the operator had to mount it manually.
This model had severe limitations:
- No interactivity: Users could not interact with running programs in real time.
- Inefficient resource use: The CPU sat idle while operators mounted tapes or read output.
- Error-prone: Manual intervention introduced delays and mistakes.
- No protection: A buggy program could corrupt memory, damage devices, or interfere with other jobs.
The Rise of Multiprogramming
The solution was to introduce software that could manage multiple programs automatically. This software became the operating system. The OS provided:
- Automatic job sequencing: Loading and running programs without operator intervention.
- Hardware abstraction: Programs no longer needed to know the specifics of tape drives, printers, or card readers. They made standard requests to the OS.
- Resource allocation: The OS decided which program ran when, sharing the CPU among multiple jobs.
- Error handling: The OS could detect and recover from hardware errors, terminating faulty programs without crashing the entire system.
The Need for Abstraction
Computer hardware consists of diverse components: CPUs with complex instruction sets, memory hierarchies, storage devices with different geometries, and network interfaces. Writing programs that directly control each component is possible but impractical for most applications.
The OS provides an abstract machine—a simplified, consistent interface to the underlying hardware. Applications written for this abstract machine can run on any hardware with a compatible OS, achieving portability.
For example, a program that reads a file uses a standard system call like open and read. The OS translates these calls into device-specific operations, whether the file resides on a spinning hard drive, SSD, or network filesystem.
From Monolithic to Modern
The earliest OSes were monolithic: a single large program that controlled everything. As systems grew more complex, OSes evolved:
- Multics (1960s): Introduced hierarchical file systems, dynamic linking, and on-line reconfiguration.
- Unix (1970s): Popularised the philosophy of small, composable tools communicating through text streams.
- Linux (1990s): Brought Unix-like capabilities to commodity hardware, enabling the modern internet.
Today, OS concepts permeate everything from smartphones to cloud infrastructure. Understanding the OS is essential for understanding how computers actually work.