Bölüm 11 · Simülatör

I/O: Polling, Interrupts, DMA

← Bölüm 11
Units
Latency
Speed 2/s

IRQs 0 CPU busy 0 Moved 0/0 Step 0/0

I/O: Polling, Interrupts, DMA

A block of units moves between a device and memory through the device controller. With polling the CPU busy-waits on the status register and copies every unit itself; with interrupts the device raises one IRQ per unit and the interrupt handler copies it; with DMA the DMA controller moves the whole block and raises one completion IRQ. The diagram shows who is active, the lanes below show CPU activity and data moved over time.

How to use

  • Choose the I/O method, the number of units (1–64), the device latency and the direction.
  • Play or step; the side panel shows the CPU mode, the controller registers and where CPU time goes.
  • Compare methods shows interrupts and CPU busy time of all three methods for the same transfer.

Terms

Polling
CPU loops reading the status register until READY, then copies.
Interrupt
Device raises one IRQ per unit; the ISR copies it.
DMA
DMA controller copies the block; one IRQ at the end.
Status
Controller register: BUSY or READY.
Data
Controller register holding one unit.
Latency
Device time per unit (1, 2 or 4).
CPU busy
Time units the CPU spends on this I/O.

Legend

busy-poll ISR I/O work user work ● data unit ⚡ IRQ

Keys

←→ stepSpace playHomeEnd first / lastEsc close