Computer Science I / Input-Output and Peripheral Communication
Practice question · Multiple choice

A DMA controller writes data into memory while the CPU holds an older copy of that region in its cache. What problem does that create?

Hints
  1. The CPU thinks it already knows what is at that address. Ask who told it.
  2. DMA bypasses the CPU entirely. What does that mean for the cache's copy?
Show the answer

B. Cache incoherence, the CPU reads its stale cached copy

Why

DMA's whole point is bypassing the CPU, so the cache is never told the memory changed and happily serves stale bytes. Device drivers therefore invalidate cache ranges around transfers, an unglamorous detail, and a classic source of bugs that appear only under load when the line happens to still be resident.

Read the lesson: Input-Output and Peripheral Communication →

Practise Input-Output and Peripheral Communication

The app has 5 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Input-Output and Peripheral Communication