The OS's memory management function allocates RAM to running programs, tracks which memory areas are free or in use, and protects programs from accessing each other's memory space.
When RAM is full, the OS uses virtual memory — it temporarily moves data from RAM to secondary storage (the hard drive), freeing RAM for the active process.
Virtual memory allows the computer to run programs larger than the available RAM, but accessing the disk is much slower than RAM, so heavy use of virtual memory significantly slows performance ("disk thrashing").
A process is a program that is currently being executed. On a single-core CPU, only one process can run at any given moment, yet modern computers appear to run many programs simultaneously — this is multitasking.
The OS achieves multitasking through scheduling: rapidly switching CPU time between processes, giving each a small time slice. From the user's perspective it appears everything runs simultaneously.
| State | Meaning |
|---|---|
| Running | Currently using the CPU |
| Ready | Waiting for CPU time (not blocked) |
| Waiting / Blocked | Waiting for an I/O event (e.g. user input, disk read) before it can proceed |
An interrupt is a signal sent to the CPU by hardware or software indicating that an event requires immediate attention. When an interrupt occurs, the CPU:
Examples of interrupts: keyboard key pressed, mouse click, network packet arrives, timer (used by the scheduler), hardware error, divide-by-zero error.
Interrupts are prioritised — higher-priority interrupts (e.g. hardware errors) pause lower-priority ones.
The OS manages the file system — the structure used to store and retrieve files on storage devices. Key responsibilities:
| File system | Used in | Notes |
|---|---|---|
| FAT32 | USB drives, older Windows | Simple, compatible; max file size 4 GB |
| NTFS | Modern Windows | Supports large files, permissions, encryption, journaling |
| ext4 | Linux | Modern Linux standard; journaling, large files |
| APFS | macOS / iOS | Optimised for SSDs |
The OS manages all connected hardware devices through device drivers. It provides a Hardware Abstraction Layer (HAL) so application software can interact with hardware without needing device-specific code.
The OS also manages I/O scheduling — controlling the order in which read/write requests to storage are handled.
8 questions · 22 marks
| Term | Definition |
|---|
Timed exam conditions.