Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 03 · How Computers Work · Many programs, one machine · about 16 min to read

Play it as a journeyTutor comes with a plan

I/O, Interrupts & the Bus

IO Interrupts and the Bus
IO Interrupts and the Bus · Open board

A device ringing for the CPU’s attention instead of being checked on, and the shared wiring that carries the answer.

Before you start. You already know a CPU can be structured to juggle many tasks at once without finishing any of them first: that’s concurrency, and it’s what lets one core serve a busy server instead of handling one thing start-to-finish (Concurrency & the Hardware). This lesson is about the one event that makes that possible: the moment a slow device actually has something ready. If a network connection is new, TCP vs UDP, and the 3-way handshake in Networking shows it in one read.

Lesson 13 of 41 in How Computers Work

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 1954: DYSEAC stops checking the door, the interrupt
  • The courier who carries the box in himself, DMA
  • Every delivery answered the same way, a driver, a file
  • A thousand deliveries at once
  • Before the first doorbell can ring

Terms it explains: interrupt, handler, DMA, driver, file descriptor, polling, The bus, memory-mapped I/O, blocking I/O, non-blocking / async I/O, Power on, firmware (BIOS/UEFI), bootloader (GRUB), Kernel, bus, device driver, event loop, I/O-bound vs CPU-bound, init / systemd, ISR / interrupt handler, timer interrupt.

Lab

The device taps the CPU on every event. What happens when it taps a million times a second?

Open Let the device tap you every time, push Events a second arriving to the top, and watch the share of arrivals handled.

Open The interrupt storm

Your write returned and the power cut a moment later. Is the record on the disk?

Click After every record, then Every 1,000 records, drag Where the power cuts, and watch Lost on the crash.

Open The fsync interval

Review How Computers Work