Operating Systems

Press the power button on a laptop, a phone or a games console and, before you open a single app, something is already hard at work. A screen appears, a mouse pointer or a home screen shows up, Wi-Fi connects, and the machine sits there patiently waiting for you. The program that does all of this — the one always running behind everything else — is the operating system, usually shortened to OS.

You already know its names even if you've never thought about it: Windows and macOS on laptops and desktops, Linux on most of the servers that run the internet, and Android and iOS on phones and tablets. Every one of them does the same core job: it manages the whole computer so that you — and all your other programs — don't have to.

The manager in the middle

A computer is really two very different worlds. Underneath is the hardware: the processor, the memory, the disk, the screen, the keyboard. On top are the applications you actually care about: a web browser, a game, a messaging app, a photo editor. Those two worlds don't speak the same language — so something has to sit between them and translate. That something is the operating system.

Applications never grab the hardware directly. Instead they ask the OS — "please save this file", "please play this sound", "give me some memory to work in" — and the OS carries out the request on the real hardware, then hands back the result. Because every app goes through this one manager, the computer stays organised even when dozens of programs are running at once.

Think of a big hotel. Guests (the apps) don't wander into the kitchen, rewire the lifts, or argue over who gets which room. They simply ask the manager (the OS), who quietly coordinates everything behind the scenes: assigning rooms (memory), deciding whose room service is delivered next (processor time), keeping the guest register and safe (files and security), and running the front desk (the user interface). Guests get what they need and never have to know how the boiler works — and two guests never end up booked into the same room. That is exactly what an OS does for programs.

The six jobs of an operating system

"Managing the computer" sounds vague, so let's pin it down. Almost everything an OS does falls into six main jobs.

It can't — not really. What actually happens is that the OS gives each program a tiny sliver of processor time (a few thousandths of a second), then pauses it, saves exactly where it was, and lets the next program run. It cycles through all of them so fast that you can't tell the switching is happening, so a music player, a browser and a chat app all seem to run at the same moment. Add more processor cores and the OS really can run several programs at once, sharing the work out between them.

Booting up

When you switch on, a small program stored in ROM runs first and loads the operating system from storage into memory. This start-up sequence is called booting. Only once the OS is loaded and running can it start the programs you want — which is why nothing works until the machine has "booted up".

The operating system is software, not hardware. You can't hold it in your hand — it's a program (a very large, very important one) stored on the disk and loaded into memory, just like any other program. The processor, RAM and disk are the hardware; the OS is the software that manages that hardware.

It's also a common mistake to think apps talk to the hardware themselves. They almost never do. An app asks the OS to do the hardware jobs on its behalf — save a file, send data over Wi-Fi, draw on the screen. This keeps the computer safe and organised: one manager is in charge, so two programs can't fight over the same device or corrupt each other's memory.