In simple terms
A friendly intro before the formal notes — no formulas yet.
The Computer's Conductor
The Operating System (OS) is the master software that manages your computer's hardware and software. It acts as the essential intermediary, allowing you and your applications to use the computer's resources without needing to know the complex details of how the hardware works.
Imagine a busy restaurant. The OS is the restaurant manager. The manager doesn't cook the food (that's the CPU) or take the orders (that's you), but they ensure the chefs have ingredients (memory), decide which table's order is cooked next (process scheduling), and direct the waiting staff (I/O devices). Without the manager, it would be chaos.
- 1
Provides a User Interface: The OS presents a way for you to interact with the computer, either through a Command-Line Interface (CLI) or a Graphical User Interface (GUI).
- 2
Manages Resources: It allocates and de-allocates essential resources like memory (RAM) and CPU time, ensuring fair and efficient use among all running programs.
- 3
Manages Processes & Tasks: The OS controls which programs (processes) are running, when they run, and for how long. It handles multitasking by rapidly switching between processes.
- 4
Handles Peripherals & Files: It manages communication with all input/output devices (like keyboards and printers) using drivers, and organises your data into a logical file system on storage drives.
Explore the concept
Use the live diagram and synced steps — play it or tap a step card to walk through.
Full topic notes
Formal explanation with the rigour you need for the exam.
The Core Purpose of an Operating System
The primary purpose of an operating system is to provide a platform on which users can run application programs in a convenient and efficient manner. It acts as an abstraction layer, hiding the intricate details of the hardware from both the user and the application software. For example, when you save a document, you don't need to know the specific track and sector on the hard disk where the data is stored; the OS's file management system handles that for you. It essentially has two main goals: managing the computer's resources and providing a user interface.
Abstraction: Hides hardware complexity from users and applications.
Resource Management: Manages CPU, memory, storage, and peripheral devices to ensure fair and efficient use.
User Interface: Provides a way for humans to interact with the machine (e.g., GUI, CLI).
Security: Controls access to system resources and protects data from unauthorised access.
Memory Management
Memory management is one of the OS's most critical tasks. It involves allocating portions of main memory (RAM) to programs and data, and ensuring that one program does not interfere with the memory space of another. The OS keeps track of every memory location, regardless of whether it is allocated or free. Two common techniques for managing memory are paging and segmentation.
Paging: Divides logical memory into fixed-size blocks called 'pages' and physical memory into 'frames'. A page table maps logical addresses to physical addresses. This allows a process's memory to be non-contiguous, reducing external fragmentation.
Segmentation: Divides logical memory into variable-size blocks called 'segments', which correspond to logical parts of a program (e.g., code, data, stack). This is more intuitive from a programmer's perspective but can lead to external fragmentation.
Virtual Memory: When RAM is full, the OS can move inactive pages or segments to a dedicated space on the hard disk (the 'paging file' or 'swap space'). This creates the illusion of having more RAM than is physically present, but accessing data from the disk is much slower.
Process and I/O Management
A process is a program in execution. The OS is responsible for managing all running processes. This includes creating and deleting processes, and providing mechanisms for synchronisation and communication between them. A key part of process management is scheduling: deciding which process gets to use the CPU next. For input/output (I/O) management, the OS manages communication with peripheral devices like keyboards, mice, monitors, and printers. It uses device drivers, which are specific pieces of software that understand how to control a particular device.
Process States: A process can be in one of several states: New, Ready (waiting for CPU), Running (being executed), Blocked (waiting for an event, e.g., I/O), or Terminated.
Scheduling: The scheduler is the OS module that selects the next job to be admitted into the system and the next process to run. Algorithms include First-Come, First-Served (FCFS), Round Robin (RR), Shortest Job First (SJF), and priority-based scheduling.
Device Drivers: The OS uses drivers to translate generic commands (e.g., 'read data') into specific instructions that the hardware controller for a device can understand.
Buffering & Spooling: Buffering uses a temporary memory area to handle data transfers between devices of different speeds. Spooling is a more advanced form of buffering, typically used for printers, where jobs are queued on the disk, freeing up the CPU to perform other tasks.
Interrupt Handling
An interrupt is a signal to the processor indicating that an event of higher priority needs immediate attention. When an interrupt occurs, the processor suspends its current task, saves its state, and executes a special routine called an Interrupt Service Routine (ISR) to handle the event. Once the ISR is complete, the processor restores the state of the original task and resumes execution. Interrupts are essential for multitasking and for handling I/O operations efficiently, as they allow the CPU to perform other work while waiting for slow devices.
Sources: Interrupts can be generated by hardware (e.g., key press, disk controller finished reading data), software (a program executing an illegal instruction), or a timer (for scheduling).
Process: 1. Interrupt signal is sent to the CPU. 2. The current instruction is completed. 3. The contents of the Program Counter (PC) and other key registers are pushed onto the system stack. 4. The PC is loaded with the starting address of the relevant Interrupt Service Routine (ISR). 5. The ISR is executed to handle the interrupt. 6. After the ISR finishes, the saved register values are popped from the stack back into the registers. 7. The original process resumes from where it left off.
In exam questions about memory management, be precise with your terminology. Distinguish clearly between 'paging' (fixed-size, non-contiguous, OS-level) and 'segmentation' (variable-size, logical units, programmer's view). For scheduling, always show your working clearly, for example by using a Gantt chart or a step-by-step trace of the ready queue.
Worked examples
See the formulas applied — reveal one step at a time, like the exam.
A computer system uses paging for memory management. The page size is 4 KB (4096 bytes). A program requires a logical address of 18000. Calculate: (i) The page number. (ii) The offset within the page. (iii) If this page is mapped to physical frame 7, what is the physical address?
- 1
(i) Page Number: To find the page number, we perform integer division of the logical address by the page size. Page Number = FLOOR(Logical Address / Page Size) Page Number = FLOOR(18000 / 4096) = FLOOR(4.3945...) = 4. So, the logical address is in page 4. [1 mark]
Four processes arrive in the ready queue in the order P1, P2, P3, P4. Their CPU burst times are 6ms, 4ms, 8ms, and 2ms respectively. The system uses the Round Robin scheduling algorithm with a time quantum of 3ms. Draw a Gantt chart to show the execution of these processes and state the order in which they complete.
- 1
The time quantum is 3ms. Processes are executed in a circular queue (P1, P2, P3, P4).
How it all connects
The big idea sits in the middle — tap a linked idea to explore the link.
Tap a linked idea to see how it connects back to the main topic — that connection is what examiners reward.
Glossary
Try to recall each definition before you reveal it.
Quick check
Answer in your head first — then tap to check. No pressure.
Revision flashcards
Flip the card. Test yourself before the exam.
Operating System (OS)
System software that acts as an interface between the user/applications and the computer hardware, managing all resources.
Key takeaways
Review these before you close the topic — retrieval beats re-reading.
- ✓
Abstraction: Hides hardware complexity from users and applications.
- ✓
Resource Management: Manages CPU, memory, storage, and peripheral devices to ensure fair and efficient use.
- ✓
User Interface: Provides a way for humans to interact with the machine (e.g., GUI, CLI).
- ✓
Security: Controls access to system resources and protects data from unauthorised access.
Practice — then mark it
The whole point: a real Cambridge question, marked mark-by-mark.
Test Your Knowledge on Operating Systems
Test Your Knowledge on Operating Systems
Extra simulations & links
PhET, GeoGebra and other curated tools — open in a new tab.
Frequently asked
Checkpoint
One marked question is worth ten re-reads — close the loop before you move on.
Reading it isn’t knowing it — prove it.
Before you move on: do Test Your Knowledge on Operating Systems on paper, snap a photo, and get examiner-style feedback on exactly where you win and lose marks.