A short lecture

Operating Systems

The quiet program that runs everything else.

Today

What we'll cover

  1. What an operating system actually is
  2. Where it sits inside the machine
  3. How it juggles work — processes, windows, memory
  4. A brief history
  5. The operating systems people use today
  6. And the ones hiding in the rest of your house

No homework. No citations. Lean back.

Definition

What is an operating system?

A computer is a pile of hardware: a processor, some memory, some storage, a screen, a keyboard, a network card, maybe a camera. None of it knows what to do.

The operating system is the program that wakes up first, takes charge of all that hardware, and offers it to your applications in a tidy, shared, reasonably safe form.

If your applications are the actors, the operating system is the stage, the lighting, the curtain, and the union rep.

The layered view

Hardware below, you on top

Picture the computer as a sandwich. The hardware is the bottom slice. You and your apps are the top. In between — holding it all together — is the operating system.

Layered model of a computer Three stacked layers: hardware at the bottom, operating system in the middle, applications on top, with the user above. You Applications — browser, editor, game, mail Operating system — kernel, drivers, services Hardware — CPU, memory, storage, screen, network
The applications never talk to the hardware directly. They go through the OS.

The big picture

Where the OS sits

Zoom in a little. The OS is in the middle of the machine — a switchboard between the things that do the work and the things that store, show, and feed the work.

The operating system as a switchboard A central rounded square labelled Operating system connects to surrounding components: CPU, memory, storage, input devices, output devices, and applications. Operating system CPU does the thinking Memory (RAM) what's in hand Storage what's on the shelf Input keyboard, mouse, mic Output screen, speakers Applications what you launched
Every interesting thing the computer does is a conversation between two of these, refereed by the OS.

Inside the OS

The kernel

At the centre of the operating system is a piece called the kernel. It is the only piece of software on the machine that is fully trusted by the hardware. Everything else — your browser, your editor, even most of the OS's own tools — has to ask the kernel politely when it wants something real to happen.

  • Talks directly to the CPU, memory, and devices.
  • Decides which program runs next, and for how long.
  • Hands out memory and takes it back.
  • Keeps one program from clobbering another's data.

If the kernel crashes, the whole machine crashes. Hence the famously unhelpful “blue screen”.

Juggling

Processes and multitasking

Your laptop seems to run dozens of programs at once. Most of the time it isn't — it's running one program for a few milliseconds, freezing it, running another, freezing it, and so on, fast enough that you can't tell.

Time-slicing across three processes Three horizontal tracks labelled Browser, Editor, Music share the CPU. Coloured bars mark which process is running during each slice of time. Browser Editor Music time →
The OS hands the CPU around. To you, it looks simultaneous.

On screen

Window management

Each running program asks the OS for a rectangle on the screen. The OS keeps the pile of rectangles in order — which one is on top, which one has the keyboard, what happens when you drag a corner.

A desktop with three overlapping windows Three rectangular windows of decreasing size are stacked, with the front one carrying a title bar and focus highlight. Focused window
Stacking, tiling, and focus — all the OS, none of the apps.

In the background

Memory management

Each program thinks it has the whole memory to itself. It doesn't — the OS hands each one a private, pretend address space and quietly maps the pieces it really needs onto real chips. When you run low, it shuffles the least-used pieces out to storage and back.

Virtual to physical memory mapping Two coloured blocks labelled Browser's view and Editor's view each map their slots to scattered slots in a single shared Real RAM strip. Browser's view Editor's view Real RAM
Each program is told a friendly lie about memory. The OS keeps the books.

On the shelf

Storage and files

Storage — a hard disk, an SSD, a flash chip — is just a long strip of numbered slots. By itself it knows nothing about “documents” or “photos”. The OS lays a file system on top: a directory, a name, a size, a timestamp, a permission. Suddenly the strip becomes a library.

Different operating systems use different file systems — NTFS, APFS, ext4, exFAT — but you only really notice when one refuses to read another's USB stick.

A brief history

From batches to phones

  1. 1950s – 60s Batch systems. You handed in a deck of punch cards and came back tomorrow.
  2. 1969 Unix is born at Bell Labs. Many things in computing today still feel like Unix because they are.
  3. 1981 MS-DOS ships on the IBM PC. One program at a time, a flashing C:\ prompt.
  4. 1984 The Macintosh brings the graphical desktop to ordinary people.
  5. 1991 A Finnish student posts the first version of Linux to a newsgroup.
  6. 1995 Windows 95. The taskbar, the Start button, the modern desktop as most people know it.
  7. 2001 Mac OS X arrives, quietly Unix underneath.
  8. 2007 – 08 iPhone OS, then Android. The OS in your pocket.
  9. Today There are more operating systems running in the average house than there were on the entire planet in 1970.

In use today

The main computer OSes

Windows

The default on most office and home PCs. Big install base, deep backwards compatibility.

macOS

Apple's desktop OS. Polished, Unix underneath, locked to Apple hardware.

Linux

Open source, dozens of distributions. Runs most of the servers on the internet.

ChromeOS

A Linux variant that puts a browser front and centre. Cheap laptops, schools.

BSDs

FreeBSD, OpenBSD, and cousins. Quietly powering routers, game consoles, and parts of macOS.

…and a long tail

Haiku, Plan 9, AmigaOS revivals, hobbyist kernels. Computing is older and weirder than the marketing suggests.

Look around

Operating systems are everywhere

You don't just have one operating system. You probably own half a dozen without thinking about it.

Phones

iOS, Android

Tablets

iPadOS, Android

TVs

tvOS, Tizen, webOS, Android TV, Fire TV

Smart speakers

Alexa, Google, HomePod

Watches

watchOS, Wear OS

Cars

Android Automotive, QNX, embedded Linux

Even your router, your thermostat, and most modern dishwashers run an operating system. It's an unglamorous job — but every glowing screen has one.

In closing

So, when you press the power button…

…a small program reads a slightly larger one from the disk, and that one reads the operating system. The OS spins up, takes stock of the hardware, opens the gates to your applications, and then politely steps into the background.

You will spend the rest of your day staring at the applications. The operating system will spend the rest of its day making sure you never have to think about it.

About this lecture · Back to the start