Explain like I'm five · Systems

What is Interrupt Handling?

Interrupt handling, told as a story about a mechanic who jots down their place and runs to an urgent bell.

HONK!mid-tire-change, and an urgent car suddenly honksthe mechanic must decide: keep working, or stop and look

An urgent car suddenly honks while the mechanic is working.The mechanic must decide: keep working, or stop and look.

urgent car yet?... not yet?...just glancing over and over (polling) steals your attentionwe need the urgent car to signal in directly

A mechanic glancing over again and again for an urgent car wastes working time.We need the urgent car to signal in directly.

jot down where I washandling an interrupt: jot down your place, then run to the bellonce the urgent job is done, pick back up where you left off

When the bell rings, jot down your place and run to it.Once the urgent job is done, pick back up exactly where you left off.

① Interrupt occursthe bell rings
② Save statejot down the current spot
③ Check the vector tablelook up who handles this bell
④⑤ Handle, then resumecontinue from the jotted spot
the interrupt-handling sequence① bell rings — interrupt occurs② jot down the spot — save state③ check the bell-type board — vector table④ the bell's handler does the urgent job (ISR)⑤ resume from the saved spot — restore statebell-type boardtire bell → mechanic 1engine bell → mechanic 2the same bell type always reaches the same handler

Handling an interrupt takes these five steps, ① to ⑤.The same bell type always reaches the same handler.

this page: the general sequence for any bellthe network-card bell alone is covered in the networking fieldevery bell follows the same sequence — save, handle, resume

Unlike the network-card bell story, this page covers the sequence common to every bell.Every bell follows the same sequence — save, handle, resume.

In one breath

Interrupt handling is the sequence of jotting down your place when a signal fires, letting the right handler do the urgent job, then resuming exactly where you left off.

An interrupt is a signal that makes the CPU pause its current instruction stream to handle something urgent. The sequence is: ① interrupt occurs ② current registers and program counter are pushed to the stack ③ the interrupt vector table is consulted for the matching ISR (interrupt service routine) address ④ the ISR runs ⑤ the saved state is restored and execution resumes where it left off. This saves CPU resources compared to constantly polling for status.

When grown-ups say it

Interrupt
The bell an urgent car honks. A signal that pauses current work.
Save/Restore State
Jotting down your place, then reading it back later. Registers and the program counter go onto the stack.
Interrupt Vector Table
A nameplate board mapping each bell type to its handler. Holds the handler address for each interrupt type.
ISR (Interrupt Service Routine)
The one who actually runs to the bell and handles it. The handler code the vector table points to.
Polling
Constantly glancing over to check. Can be less efficient than interrupts.
Interrupt Priority
Handling the more urgent bell first. Matters when several bells ring at once.
Software Interrupt
The mechanic pressing the bell themselves to make a request. Older x86 system calls used this; x86-64 has a dedicated syscall instruction.
Network Interrupt
The story about the network-card bell specifically. Covered in depth in another field (the networking field). → the bell that says a parcel just arrived
Next story
Redrawing the Repair Process from Scratch →
Want another term as a picture book? Request →