An operating system (OS) is the program that sits between your applications and the hardware. It has two jobs:
- Resource manager. It shares the CPU, memory, disk and devices between many programs, fairly and safely.
- Extended machine. It hides messy hardware behind clean abstractions: files instead of disk sectors, processes instead of raw CPU registers, sockets instead of network cards.
The core of the OS that is always in memory is the kernel. Everything else (shell, compilers, editors) is a user program, even if it ships with the OS.
| OS function | What it manages |
|---|---|
| Process management | Creating, scheduling and ending processes |
| Memory management | Who gets which part of RAM |
| File management | Files, directories, permissions |
| Device (I/O) management | Drivers, buffering, interrupts |
| Protection and security | Stopping one program from harming another |
The trap: the shell and the GUI are not the kernel. They are user programs that talk to the kernel through system calls.
In interviews: "What is an OS?" Answer in one line ("software that manages hardware resources and provides services to programs"), then name two or three functions from the table.