What Is an Operating System?
What is an operating system? Learn how the OS manages the CPU, memory, files, and devices, what a kernel does, and examples like Windows, macOS, Linux, and Android. With a quiz.
Key takeaways
- An operating system (OS) is the master program that controls a computer and lets other programs run
- The kernel is the core of the OS; it manages the CPU, memory, files, and devices
- The OS shares the CPU between many programs by switching between them very fast
- Examples include Windows, macOS, Linux, Android, and iOS
The program that runs all the other programs
Every phone, laptop, and game console has one special piece of software that starts first and stays in charge the whole time it is switched on. That software is the operating system, usually shortened to OS.
Without an operating system, a computer would just be a box of electronics with no idea what to do. The OS is the bridge between the hardware (the physical parts like the chip and the memory) and the apps you actually use, like a browser, a game, or a messaging app.
You have almost certainly used several operating systems already. Windows and macOS run on most laptops, Linux runs most of the world's servers, and Android and iOS run most phones.
What the OS actually does
An operating system has four big jobs. Think of it as the manager of a busy kitchen, making sure everyone gets what they need without crashing into each other.
1. Managing the CPU. The CPU (the computer's "brain") can only really do one thing at a time per core. Yet you can have music playing, a chat open, and a browser loading all at once. The OS makes this possible by scheduling — it gives each program a tiny slice of CPU time, then switches to the next one, thousands of times every second. It happens so fast that everything seems to run at the same time. If you want to know more about the chip itself, see What Is an Algorithm? for the kind of step-by-step instructions a CPU follows.
2. Managing memory. When a program runs, it needs space in RAM (the computer's short-term memory) to hold its data. The OS decides which program gets which part of memory and makes sure one program cannot accidentally read or overwrite another program's data. When a program closes, the OS reclaims its memory for something else.
3. Managing files and storage. Your photos, documents, and apps are stored on a disk or flash chip as long lists of 1s and 0s. The OS organises them into files and folders through something called a file system, so you can find "my_homework.docx" instead of remembering exactly where on the disk it lives.
4. Managing devices. Keyboards, screens, printers, cameras, and Wi-Fi chips all need to talk to the computer. The OS uses small programs called drivers to translate between the hardware and the rest of the system, so every app doesn't have to know the details of every device.
The kernel: the core of the OS
At the very centre of the operating system is the kernel. This is the part that talks directly to the hardware and has the most power over the machine. The kernel handles the most important jobs: sharing the CPU, protecting memory, and controlling access to devices.
Ordinary apps are not allowed to touch the hardware directly. Instead, when an app needs something — say, to read a file or send data over the internet — it asks the kernel using a system call. This is like a customer in a restaurant asking a waiter instead of walking into the kitchen. It keeps things safe and organised, because one badly written app cannot crash the whole machine or spy on other programs.
A quick walk-through
Imagine you double-click a music app. Here is roughly what the OS does:
- It finds the app's file on storage and loads it into memory.
- It gives the app a slice of CPU time to start running.
- The app asks the kernel, through a system call, to open your song file.
- The kernel reads the data from the disk and hands it back.
- The app asks the OS to send sound to the speaker driver.
- Meanwhile, the OS keeps switching to your other apps so nothing freezes.
All of that happens in the blink of an eye, every single time you tap an icon.
Why one computer needs so many at once
Modern computers run dozens of programs in the background without you noticing — checking for updates, syncing files, managing the network. The operating system is what keeps all of this from turning into chaos. It is the reason you can think about your homework or your game instead of about which part of memory it lives in.
Try this activity
Spot your operating system. On any device you are allowed to use, find the "About" screen (often in Settings). Note down the name and version of the operating system. Then list three apps running on it. For each app, write down one thing it must be asking the OS to do — for example, a camera app asks the OS to use the camera device, and a notes app asks the OS to save files.
To go deeper, see how programs store information in Lists and Arrays and how computers connect to each other in How the Internet Works.
Quick quiz
Test yourself and earn XP
What is the main job of an operating system?
The OS manages the hardware (CPU, memory, storage, devices) and provides services so apps can run without controlling the hardware directly.
What is the kernel?
The kernel is the central part of the operating system. It manages memory, the CPU, and access to devices.
How can one CPU seem to run many programs at once?
The OS uses scheduling to switch between programs thousands of times a second, so it feels like they run at the same time.
Which of these is an operating system?
Android is an operating system used on many phones. Browsers and spreadsheets are apps that run on top of an OS.
Why do programs ask the OS to save a file instead of writing to the disk directly?
The OS manages the file system so files don't overwrite each other and permissions are respected.
FAQ
Both, in a sense. Windows is an operating system made of many programs working together. The most important one is the kernel, which talks directly to the hardware. The desktop, menus, and settings are also part of Windows but sit on top of the kernel.
Yes. Most phones run Android or iOS. They do the same core jobs as a computer's OS — managing memory, storage, the screen, and apps — but are designed for touch screens and saving battery.
The OS is the master software that controls the whole computer. An app (like a game or browser) is a single program that runs on top of the OS and asks the OS for things like memory, files, and screen space.
Keep exploring
More in Coding