Operating System Basics·Lesson 1 of 11
What is an Operating System?
The Short Answer
An operating system (OS) is the software that sits between the physical hardware of a computer and the programs you actually want to use. When you open a browser, save a photo, or plug in a USB drive, you never talk to the hardware yourself — the operating system does it on your behalf. It is the first real program that runs when a machine starts up, and it keeps running until the machine shuts down.
Windows, macOS, Linux, Android, and iOS are all operating systems. They look very different on the surface, but underneath they all do the same two things: they manage the machine's resources, and they hide the messy details of that hardware behind a clean, uniform interface that programs can rely on.
The one-line definition
An operating system is a resource manager and a hardware abstraction layer. It decides who gets the CPU, memory, and disk, and it gives every program the same simple way to ask for them — no matter what hardware is underneath.
Think of a hotel manager
Guests (programs) don't negotiate directly for rooms, towels, or a table at dinner. They ask the manager, who knows what's free, decides who gets what, keeps guests out of each other's rooms, and settles disputes when two people want the same thing. Guests get a simple experience — ask, and it's arranged. The operating system is that manager, and the CPU, memory, and disk are the rooms.
Where the OS Sits
The clearest way to picture an operating system is as a middle layer in a stack. At the bottom is the raw hardware — the CPU, RAM, disk, keyboard, and screen. At the top are the applications you use every day. The operating system fills the gap, and its innermost, most privileged part is called the .
The computer system stack, top to bottom
User / Applications
Browser, editor, games, spreadsheets — the software you launch
System Programs & Libraries
Shell, file explorer, compilers, standard libraries that wrap OS features
Operating System (Kernel)
Scheduling, memory management, file systems, device drivers, protection
Hardware
CPU, RAM, disk, GPU, network card, keyboard, screen
Notice that applications never reach past the OS to touch the hardware directly. When a program wants to read a file, it makes a — a formal request into the kernel — and the kernel does the actual work of talking to the disk. That single rule is what makes a computer both safe and shareable.
The Two Jobs, Spelled Out
Every textbook definition of an operating system boils down to two roles. Keep these two in your head and almost every OS topic you'll study later becomes easier to place — scheduling, paging, and file systems are all just one of these two jobs applied to a specific resource.
Resource Manager
The CPU, memory, and disk are limited and every program wants them. The OS decides who gets what, for how long, and in what order — fairly and without letting one program starve the rest.
Abstraction Provider
Raw hardware is awkward and inconsistent. The OS turns it into simple ideas any program can use: a file instead of disk sectors, a process instead of CPU registers, a socket instead of a network card.
Protection & Isolation
Because the OS owns every resource, it can keep programs apart. One crashing app can't corrupt another's memory, and one user can't read another's private files.
Portability
Because programs talk to the OS instead of the hardware, the same application runs on machines with different disks, graphics cards, and CPUs. The OS absorbs the difference.
OS, Kernel, and Shell — Not the Same Thing
These three words get used interchangeably in casual conversation, and interviewers notice when a candidate blurs them. The operating system is the whole package. The kernel is its privileged core. The is just one program on top that lets a human type commands. Here's how they line up:
| Kernel | Shell | Operating System | |
|---|---|---|---|
| What it is | The privileged core of the OS | A command interpreter for users | The kernel plus the software around it |
| Runs in | Kernel mode (full hardware access) | User mode (no direct hardware access) | Both — kernel core, user-mode utilities |
| Always loaded? | Yes, from boot until shutdown | No, started and stopped like any program | Yes, as a whole system |
| Talks to | Hardware directly | The kernel, via system calls | Hardware below, applications above |
| Example | The Linux kernel | Bash, Zsh, PowerShell | Ubuntu Linux, Windows 11, macOS |
What Happens Before the OS Loads
The OS can't start itself, because starting a program is something an OS does. So a small chain of steps runs first: the baked into the motherboard wakes up, checks the hardware, and hands control to a small program called the , which finds the kernel on disk and loads it into memory. Only then does the operating system take over.
From power button to desktop
- You press power — the CPU begins executing firmware (BIOS or UEFI) from a chip on the motherboard
- The firmware runs a quick hardware self-test and finds a bootable disk
- The firmware loads the bootloader from that disk and hands over control
- The bootloader locates the OS kernel, copies it into memory, and jumps to it
- The kernel initializes memory management, device drivers, and its data structures
- The kernel starts the first user-space process, which launches the login screen and the rest of the system
Why it's called "booting"
The name comes from "pulling yourself up by your bootstraps" — the machine has to load the very software that knows how to load software. Each tiny step loads a slightly bigger one until the full OS is running.
Operating Systems Are Everywhere
It's easy to think of an OS as something only laptops and phones have. In reality almost every device with a processor runs one, and the OS is tuned to what that device needs. A phone OS optimizes for battery and touch input. A server OS optimizes for throughput and uptime. A pacemaker's OS optimizes for meeting deadlines exactly on time, every time.
Familiar operating systems and where they run
- Desktops and laptops — Windows, macOS, Linux distributions like Ubuntu and Fedora
- Phones and tablets — Android (built on the Linux kernel) and iOS
- Servers and the cloud — Linux dominates here, alongside Windows Server
- Embedded and IoT devices — routers, smart TVs, and cameras usually run a stripped-down Linux
- Safety-critical hardware — medical devices, car braking systems, and industrial robots run a real-time OS
“"The operating system is the desktop, windows, and icons I see on screen."”
“"The kernel and the operating system are two names for the same thing."”
Q:Could a computer run programs without an operating system?
A: Technically yes — a single program can be written to control the hardware directly, and this is still done on very simple embedded chips. But that program has to include its own device drivers, manage memory by hand, and it can only be one program, because nothing exists to share the CPU. The moment you want two programs at once, protection between them, or the same software to run on different hardware, you need an operating system.
Q:Is an operating system just another program?
A: It is software, but it is privileged software. Ordinary programs run in user mode with restricted access, while the kernel runs in kernel mode with full control over the hardware. The OS is also the program that starts, stops, and polices all the others — so it sits in a category of its own.
Quick Revision Cheat Sheet
Operating system: Software between hardware and applications; manages resources and abstracts hardware
Two core roles: Resource manager (who gets what) + abstraction layer (hide hardware details)
Kernel: The privileged core of the OS, always in memory, full hardware access
Shell: A user-mode program that passes commands to the OS — not the kernel
System call: The only legal way a program can request a kernel service
Boot order: Firmware (BIOS/UEFI) → bootloader → kernel → first user process
Examples: Windows, macOS, Linux, Android, iOS, and embedded real-time systems