- What an operating system is for
The OS manages the hardware so programs and users don't have to.
An operating system (OS) is the system software that sits between the hardware and the user/applications. Without it, every program would have to control the processor, memory and devices directly.
The OS has two big purposes that this topic focuses on:
1. Maximising the use of resources. Hardware (especially the CPU and memory) is expensive and limited, so the OS works to keep it busy and shared efficiently:
| Resource | How the OS maximises its use |
|---|---|
| CPU | schedules processes (multi-tasking) so the processor isn't idle while one process waits for IO |
| Memory | manages RAM, and uses virtual memory so programs bigger than RAM can still run |
| Peripherals | shares devices fairly between processes and uses interrupts instead of wasteful polling |
2. Hiding complexity. The user interface lets people and programs make simple requests ('save this file') while the OS deals with the messy hardware detail underneath (see §2).
- The OS sits between hardware and the user/applications.
- It maximises CPU, memory and peripheral usage.
- Virtual memory lets programs larger than RAM run.
- Interrupts keep the CPU from wasting time polling devices.
See the full worked example for purposes of an operating system (os) →