IGCSE · Practice questions · Interrupts

Signal, save, serve.

Six original Cambridge-style questions on how interrupts are generated and handled, with mark-scheme solutions.

Original questions All questions on this page are original work, written in the Cambridge IGCSE style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
Keep these straight

Say every step.

01
Recall
[2 marks]

Give one example of a hardware interrupt and one example of a software interrupt.

  • Hardware: pressing a key on the keyboard / moving the mouse / printer out of paper. ✓
  • Software: division by zero / two processes trying to access the same memory location. ✓
02
Explain
[5 marks]

Describe how an interrupt is handled by the processor.

  • The interrupt signal is sent to the processor. ✓
  • At the end of the current fetch-decode-execute cycle the processor checks for interrupts and compares the interrupt's priority with the current task. ✓
  • If the interrupt has a higher priority, the contents of the registers are saved. ✓
  • The appropriate interrupt service routine (ISR) is run. ✓
  • The register contents are restored and the original task continues. ✓
03
Apply
[3 marks]

A user is printing a report when the printer runs out of paper. Describe how an interrupt is generated and what happens as a result.

  • The printer (hardware) generates an interrupt signal and sends it to the processor. ✓
  • The processor runs the interrupt service routine for the printer. ✓
  • A message is displayed asking the user to add paper; once paper is loaded, printing resumes (meanwhile other tasks continue). ✓
04
Explain
[2 marks]

Explain why the contents of the registers are saved before an interrupt service routine is run.

  • The ISR will use the registers and would overwrite their values. ✓
  • Saving them means they can be restored so the interrupted task can resume exactly where it stopped. ✓
05
Explain
[2 marks]

Explain why a computer uses interrupts instead of the processor repeatedly checking every device.

  • The processor does not waste time checking devices that have nothing to report, so it can get on with other tasks. ✓
  • Urgent events are responded to quickly because they signal the processor themselves (allowing multitasking). ✓
06
Analysis
[2 marks]

Two interrupts arrive at the same time: one from the mouse and one reporting a memory error that could corrupt data. Explain which is serviced first and why.

  • The memory error is serviced first. ✓
  • Interrupts are handled in order of priority, and an error that could corrupt data has a higher priority than a mouse movement. ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.