What an operating system does
An operating system (OS) is the software that manages the computer's hardware and provides a platform for application programs to run on. Without it, every program would need to control the hardware itself.
Its jobs fall into two groups:
Managing resources
| Resource | What the OS does |
|---|---|
| Processor | Decides which process runs and for how long (scheduling) |
| Memory | Allocates memory to programs, keeps them apart, frees it when they finish |
| Input and output devices | Controls devices through device drivers; handles interrupts; queues jobs for printers |
| Backing storage | Organises files into directories and keeps track of where each file is stored |
| Security | User accounts, passwords and access rights; keeps one program from damaging another |
Providing an interface
- a user interface, so people can run programs and manage files
- an interface for programs: programs ask the OS to do things (open a file, print, allocate memory) through system calls, so they don't need to know the details of the hardware
Examples: Windows, macOS, Linux, Android, iOS. Embedded systems such as washing machines often have a very small OS, or none at all.