GCSE · Computer Science · Eduqas · Spec C500QS
OS interrupt management
Mid-sentence, your phone buzzes. You glance, reply, then carry on from the exact word you stopped at. A processor pulls the very same trick.
Computer Science · Operating systems
Follow the processor through an interrupt
An interrupt is a signal telling the processor that an event needs attention, and managing it is one of the operating system's jobs. Program A is running when one arrives. Call each step before you see it.
Step through with Next. When Next is held, make your call, then see what really happens.
| Processor is running | Saved on the stack | Waiting |
|---|---|---|
| Program A, instr 3 | empty | none |
Step 1. Program A is part-way through its instructions and is on instruction 3. Nothing needs attention yet, so the stack is empty.
Try all three runs: a single interrupt, a higher-priority interrupt cutting in, and a lower-priority one arriving.
Where interrupts come from
Hardware or software?
Sort each event by what generates the interrupt.
Still to sort
Hardware (0)
A device needs attention.
Where the line is: The signal comes from a device such as the keyboard, mouse or printer.
Software (0)
A running program has caused an error.
Where the line is: The signal comes from a program that is running, not from a device.
Same signal, two possible sources. Decide who raised it.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
How the processor drops a task, deals with something urgent, then picks up exactly where it left off.
What you need to know
- An interrupt is a signal sent to the processor to say an event needs attention.
- Managing interrupts is one of the operating system's jobs: it arranges for them to be detected and dealt with.
- Hardware (a key press, a printer out of paper) and software (a program dividing by zero) can both generate interrupts.
Have a goYour classmate Sam insists: "Interrupts only come from devices. A program can't send one." Using what you just read, how do you prove Sam wrong?
A running program that causes an error, such as dividing by zero, generates an interrupt.
Sam only counted devices. Software can generate interrupts as well as hardware.
- When an interrupt arrives, the task the processor is carrying out is paused, not cancelled.
- Before the interrupt is dealt with, the paused task's state is saved, typically on a stack in memory.
- That state is the processor's register contents, including the address of the next instruction.
Have a goA program is paused by an interrupt. Name the one thing in its saved state that tells the processor where to carry on.
The address of the next instruction.
Saving it (with the registers) means the task resumes where it paused. Without it the processor would have nowhere to carry on from.
- An interrupt service routine (interrupt handler) is the specific code that deals with that kind of interrupt.
- Once the routine finishes, the saved state is restored and the task resumes exactly where it left off.
- A higher-priority interrupt goes first, and can interrupt the handling of a lower-priority one; lower-priority interrupts wait.
Have a goInterrupt P is being handled when interrupt Q arrives, and Q has a lower priority than P. What does Q do?
Q waits until P has been dealt with.
Arriving later does not let Q cut in. Only a higher-priority interrupt can interrupt the handling of another.
- Interrupts let the computer respond promptly, without the processor having to keep checking every device.
The big picture
An interrupt is a signal telling the processor that an event needs attention. The operating system pauses the current task, saves its state, runs the matching interrupt service routine, then restores the state so the task carries on exactly where it stopped. Priorities decide which interrupt goes first.
Key points
Worked example
Problem
Program Z is running. Interrupt MID arrives and its routine starts. While that routine is running, interrupt HIGH arrives, then interrupt LOW. HIGH has a higher priority than MID, and LOW has a lower priority than MID. In what order do the three routines finish, and how many saved states are on the stack while HIGH's routine is running?
⚠ Watch out
Assuming the interrupt that arrives first is always dealt with first. Priority decides: a later, higher-priority interrupt cuts in, and a later, lower-priority one waits.
Memory hook
Bookmark, don't bin: pause, save, run the routine, restore, resume.
Check yourself
Cover the page. Say the five stages of dealing with an interrupt in order, then say what changes if a higher-priority interrupt turns up halfway through a routine.
Flashcards
(12)What is an interrupt?
Whose job is it to manage interrupts?
Give two examples of hardware generating an interrupt.
Give an example of software generating an interrupt.
What happens to the current task when an interrupt is received?
What is saved before the interrupt is dealt with?
Where is the paused task's state typically saved?
What is an interrupt service routine?
What happens when the interrupt service routine finishes?
A higher-priority interrupt arrives while a lower-priority one is being handled. What happens?
What happens to a lower-priority interrupt that arrives during handling of a higher-priority one?
Why use interrupts rather than the processor checking every device?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore Eduqas GCSE Computer Science topics
How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 16 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.