What Is an Operating System?
What an operating system does, how the kernel and the rest of the system divide the work, and the kinds of operating systems you will meet.
What an operating system does
An operating system (OS) is the software that manages a computer's hardware and lets other programs use it. Without one, every program would need its own code to drive the disk, draw on the screen, read the keyboard and talk to the network — and two programs running at the same time would fight over the same hardware. The OS does that work once, for everyone.
It has two big jobs, and they explain almost everything it does.
- Resource manager. The central processing unit (CPU), memory (RAM, random access memory), storage and devices are shared by many programs. The OS decides who gets what and when: which program runs on which CPU core (see CPU Scheduling), which part of memory belongs to whom (see Memory Management), and who may open which file (see Users, Permissions and Access Control). It also keeps programs apart, so one misbehaving application cannot read another's memory or crash the whole machine.
-
Abstraction. The OS hides messy hardware details
behind simple ideas. A program asks to "open
report.docx"; it does not need to know whether the file lives on a Non-Volatile Memory Express (NVMe) solid-state drive (SSD), a Universal Serial Bus (USB) stick or a network share, or in which sectors. Files, folders, processes, windows and network connections are all abstractions the OS invents so that applications can be written once and run on many different machines.
On top of that the OS provides services (printing, networking, time synchronization, updates, security logging) and a user interface through which people start programs, manage files and change settings.
The kernel and everything else
An operating system is not one program but a collection. At its
center is the
kernel: the first part of the
operating system to be loaded (by the bootloader), which stays in
memory the whole time, and runs with full control over the hardware.
The kernel schedules programs on the CPU, manages memory, handles
devices through their drivers, and enforces security. On Windows the
kernel lives in ntoskrnl.exe; on Linux it is the file
vmlinuz in /boot; macOS uses a kernel
called XNU.
Everything else runs as ordinary programs in user mode, without direct hardware access. Their permissions still differ: a service running as LocalSystem may do far more than your web browser. These programs include:
- Shells — the programs you use to give the OS commands (below).
-
Utilities — small tools that ship with the OS:
Notepad, Disk Management,
ping,ls, Task Manager. - Services — background programs that start at boot and keep running without a user, such as the print spooler or Windows Update. On Unix-like systems they are called daemons. See Processes and Threads.
- The desktop — the window manager, taskbar, start menu and notification area.
-
Libraries — shared code that applications call to
use OS features, such as the Windows application programming
interface (API) in files like
kernel32.dll, or the C library on Linux and macOS.
Why split it this way? Because the kernel is trusted with everything, a bug in it can bring the whole computer down — a Windows stop error ("blue screen") or a Linux or macOS kernel panic. Keeping the kernel small and running everything else with limited rights means that a crashing program usually takes only itself down. How the CPU enforces that split is the subject of Kernel, System Calls and Drivers.
Shells: GUI and CLI
A shell is the program that sits between the user and the operating system: it takes what you ask for — double-click an icon, type a command — and asks the OS to do it. The name comes from the picture of a shell around the kernel. There are two kinds.
Graphical user interface
A
graphical user interface (GUI)
shows windows, icons and menus that you operate with a mouse,
touchpad or touchscreen. On Windows the graphical shell is File
Explorer (explorer.exe), which also draws the taskbar
and Start menu — that is why restarting "Windows Explorer" in Task
Manager makes the taskbar disappear and come back. macOS has the
Finder and the Dock; Linux has desktop environments such as GNOME
and KDE Plasma; phones have their home-screen launchers. A GUI is
easy to discover: you can see what is possible.
Command-line interface
A
command-line interface (CLI)
reads typed commands and prints text back. Windows has Command
Prompt (cmd.exe) and PowerShell; Linux usually has
bash; macOS uses zsh by default since macOS Catalina (10.15). A CLI
is harder to learn but faster for repetitive work, precise (a
command means exactly one thing), easy to document in a ticket, and
scriptable: a command that fixes one PC can be run on five hundred.
Servers are often managed only through a CLI, locally or over the
network.
Do not confuse the shell with the window it runs in. Windows Terminal, the macOS Terminal app and the Linux terminal emulators are terminal programs: they draw the text window and pass your keystrokes to a shell such as PowerShell, cmd, bash or zsh running inside it. See Windows Command Line and PowerShell and Linux at a Glance.
Finding out which OS a computer runs
The first question on many tickets is "which OS and which version?"
In Windows, press Win+R and run
winver, or open
Settings › System › About. From the command line
(illustrative output):
systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"
OS Name: Microsoft Windows 11 Pro OS Version: 10.0.26100 N/A Build 26100 System Type: x64-based PC
Note that Windows 11 still reports version 10.0; the build number
tells you the release (build 26100 is version 24H2). On Linux,
/etc/os-release names the distribution and
uname the kernel:
grep PRETTY_NAME /etc/os-release
uname -srm
PRETTY_NAME="Ubuntu 24.04.1 LTS" Linux 6.8.0-45-generic x86_64
On a Mac, choose Apple menu › About This Mac, or
run sw_vers in Terminal.
Types of operating systems
All operating systems do the same basic jobs, but they are tuned for very different situations.
| Type | Tuned for | Examples |
|---|---|---|
| Desktop (workstation) | One person at a time, a responsive GUI, wide hardware and software support | Windows 11, macOS, Linux desktops, ChromeOS |
| Server | Many network clients, long uptime, remote management; often no GUI at all | Windows Server, Red Hat Enterprise Linux, Ubuntu Server |
| Mobile | Touch, battery life, cellular and wireless radios, apps from a store, strong isolation between apps | Android, iOS, iPadOS |
| Embedded | One dedicated job, small hardware, no or minimal user interface | Embedded Linux in routers, printers and smart TVs; firmware in appliances |
| Real-time | Guaranteed response within a fixed time limit | FreeRTOS, Zephyr, VxWorks, QNX |
Embedded systems
An embedded system is a computer built into a larger device to do one dedicated job: the controller in a washing machine, a network printer, a Wi-Fi router, a car's braking system, a smart thermostat. Many Internet of Things (IoT) devices are embedded systems. Their OS is usually stored in flash memory with the firmware, updated as one image, and not meant to be changed by the user. That matters for support: an embedded device gets security fixes only when its maker publishes a firmware update, so old routers and cameras often stay vulnerable for years.
Real-time operating systems
A real-time operating system (RTOS) guarantees that a task will respond within a fixed, predictable time. That is not the same as fast: a desktop OS is often faster on average, but it may occasionally pause a program for a few milliseconds to do something else. For a video player that does not matter; for an airbag controller it is unacceptable.
- Hard real-time: missing a deadline is a failure of the system. Examples: airbag deployment, engine control, industrial robots, pacemakers.
- Soft real-time: an occasional missed deadline lowers quality but does no harm. Examples: audio and video streaming, video calls, games.
The main families today
| OS | Maker | Where you meet it | Heritage |
|---|---|---|---|
| Windows | Microsoft | Most office and home PCs; Windows Server in company networks | Windows NT line (not Unix) |
| macOS | Apple | Mac desktops and laptops | Unix (via NeXTSTEP and BSD); certified as UNIX |
| Linux | Community and companies; many distributions | Servers, cloud, supercomputers, embedded devices, some desktops | Unix-like, written from scratch |
| Android | Google, with phone makers | Most smartphones worldwide, tablets, TVs | Built on the Linux kernel |
| iOS and iPadOS | Apple | iPhone and iPad | Shares its core with macOS |
| ChromeOS | Chromebooks, especially in schools | Built on the Linux kernel; centered on the Chrome browser |
Unix, created at Bell Labs around 1970, is the
ancestor of much of this table. Its ideas — a hierarchical file
system starting at /, small tools combined with pipes,
users and permission bits, "everything is a file" — live on in
macOS, Linux, Android, iOS and ChromeOS. That is why commands such
as ls, cd and chmod work
nearly the same on a Mac and on a Linux server. Windows comes from a
different line (Windows NT, 1993), which is why it uses drive
letters, backslashes in paths and a different permission model.
Where each one is used shifts slowly but steadily. At the time of writing, roughly seven in ten desktop and laptop computers run Windows, with macOS second; Android runs roughly seven in ten smartphones worldwide and iOS nearly all the rest; and Linux runs most servers and cloud workloads and every one of the world's 500 fastest supercomputers.
32-bit and 64-bit operating systems
A "32-bit" or "64-bit" OS is built for a CPU that works with memory addresses of that width. The width sets how many different addresses exist, and so how much memory the OS can use:
print(f"32-bit: {2**32:,} addresses = {2**32 // 2**30} GiB")
print(f"64-bit: {2**64:,} addresses = {2**64 // 2**60} EiB")
32-bit: 4,294,967,296 addresses = 4 GiB 64-bit: 18,446,744,073,709,551,616 addresses = 16 EiB
A 32-bit Windows desktop edition can therefore never use more than 4 GiB of RAM, and in practice less, because part of the address range is reserved for devices. (32-bit Linux and some 32-bit Windows Server editions could reach more RAM through Physical Address Extension, PAE, but each 32-bit process is still limited to 4 GiB of address space.) 64-bit removes that ceiling (today's CPUs and editions set lower, but still very large, practical limits). Things a technician should know:
- A 64-bit OS needs a 64-bit CPU (x64, also called x86-64, or ARM64). Windows 11, current macOS versions and most Linux distributions exist only as 64-bit systems.
-
64-bit Windows runs most 32-bit programs through a compatibility
layer called WOW64 (Windows 32-bit on Windows 64-bit). It installs
them in
C:\Program Files (x86), and 64-bit programs inC:\Program Files. Very old 16-bit programs do not run on 64-bit Windows at all. - Drivers run inside the kernel, so they must match it: 64-bit Windows needs 64-bit drivers, with no compatibility layer. An old printer whose maker only ever released a 32-bit driver will not work.
- Current macOS versions run only 64-bit apps (since macOS Catalina, 10.15).
In Windows, Settings › System › About shows it on the line System type, for example "64-bit operating system, x64-based processor".
What happens when you start a program
Double-clicking an icon looks like one action, but it touches every part of the operating system:
-
The shell (File Explorer, or bash after you type
a command) asks the kernel to start the program. On Windows this
is the
CreateProcessfunction; on Linux and macOS the shell callsforkto make a copy of itself, and the copy callsexecto become the new program. - The kernel creates a process: a new, private address space in memory, a process ID and a security context (whose rights the program gets — yours).
-
The loader reads the program file (
.exeon Windows) into that address space, together with the shared libraries it needs, such as dynamic-link libraries (DLLs). A missing DLL fails right here, with an error such as "The code execution cannot proceed because … was not found". - The kernel creates the program's first thread, and the scheduler gives it time on a CPU core.
- From then on, every time the program wants to open a file, draw a window or send data, it asks the kernel through a system call.
Processes and Threads continues from here: what the OS keeps for every running program, and how to inspect and stop one.