Questions: Interrupts and Direct Memory Access (DMA)

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A keyboard generates one keystroke every 50 milliseconds. With polling, the CPU checks the keyboard status register every 1 millisecond. What is the primary advantage of switching to interrupt-driven I/O?

AThe keyboard can process keystrokes faster because it no longer waits for the CPU to check
BThe CPU is freed to execute other instructions between keystrokes instead of spinning in a polling loop
CInterrupts eliminate the need to save and restore CPU state when handling device events
DThe CPU can handle multiple devices simultaneously without any performance overhead
Question 2 Multiple Choice

A disk controller needs to transfer 16 KB of data from disk to RAM. Comparing interrupt-driven I/O (one interrupt per byte) versus DMA, what is the primary advantage of DMA?

ADMA bypasses the memory bus entirely, so CPU memory accesses are completely unaffected during the transfer
BDMA eliminates the need for the CPU to set up the transfer — the disk controller handles everything autonomously
CDMA reduces the number of CPU interrupts from thousands (one per byte) to a single completion interrupt
DDMA transfers data faster than interrupt-driven I/O because the DMA controller uses a dedicated high-speed bus
Question 3 True / False

An interrupt is triggered by the instruction currently executing in the CPU, while an exception is triggered by an external hardware device.

TTrue
FFalse
Question 4 True / False

After an interrupt service routine completes, the interrupted program resumes execution exactly where it was paused, with all register state restored.

TTrue
FFalse
Question 5 Short Answer

Explain why polling is less CPU-efficient than interrupt-driven I/O, and describe the step-by-step sequence from when a device needs service to when the CPU resumes its original work.

Think about your answer, then reveal below.