The big idea: A single core runs one instruction at a time. Multitasking is the OS switching between processes so fast that all of them appear to run together.
What looks like simultaneity is rapid switching — and every switch costs real work.
| Concurrency | Parallelism | |
|---|---|---|
| Means | Several tasks in progress | Several tasks executing |
| Needs | One core is enough | More than one core |
| Achieved by | Switching between them | Genuinely at the same instant |
| A single core gives | Concurrency only | Never parallelism |
Free preview
This is the free notes preview
You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:
- FlashcardsLock in vocabulary and key terms with spaced repetition.
- Practice questionsAnswer exam-style questions and get instant AI marking.
- Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
- Personalised study planA daily plan built around your exam date and weak areas.
Save
The current process's registers, program counter and flags are written to its process control block — everything needed to resume exactly where it stopped.
Choose
The scheduler picks which process runs next, by whatever policy it uses.
Restore
That process's saved state is loaded back into the registers.
Resume
Execution continues from its program counter. The process cannot tell it was ever stopped.
Switching is not free: Every switch spends time saving and restoring state, and the new process arrives to find the cache full of the previous one's data — so its first memory accesses are slow.
Switch too often and the system spends more time switching than working. That is thrashing.
Get feedback like a real examiner
Submit your answers and get instant feedback — what you did well, what's missing, and exactly what to write to score full marks.
What the OS is handing out
- CPU time — divided into slices by the scheduler
- Memory — each process given its own space, and kept out of everyone else's
- Devices — one process at a time may hold a printer or a file
- Files and locks — access serialised so two writers cannot corrupt one file
Resource contention: Resource contention is two or more processes wanting the same resource at the same time: two programs printing, or two writers on one file. The OS makes one wait, which can slow the system and, if waits form a circle, cause deadlock.
Deadlock, and its four conditions: Process A holds the printer and wants the scanner; B holds the scanner and wants the printer. Neither can continue.
It needs all four of: mutual exclusion, hold-and-wait, no pre-emption, and circular wait. Break any one and deadlock becomes impossible — which is how operating systems prevent it.
Starvation is not deadlock: Deadlock: nobody can proceed, ever. Starvation: the system is running fine, but one low-priority process never gets a turn because higher-priority work keeps arriving.
Starvation is fixed by ageing — raising priority the longer a process waits.
How this is tested — you must explain apparent simultaneity as switching, and name what it costs. It comes up two ways:
Paper 1 Section A
- Explain the role of the OS in multitasking, 3-4 marks
- Describe what happens in a context switch
- Distinguish concurrency from parallelism
Paper 1 Section B — case study
- Explain a deadlock in a scenario
- Justify why switching has a cost
The classic trap: Saying a single-core computer runs programs "at the same time". It runs one instruction at a time and switches rapidly — that is concurrency, not parallelism.
A single-core laptop appears to run a browser, a music player and a download at once. Explain how the operating system achieves this and what it costs.
Model answer plan
See the answer broken into clear points, with guidance on how each point earns marks.