Devices, interrupts and parallel hardware
How the processor talks to devices with polling, interrupts and DMA, and how multicore chips, GPUs and cache coherence work.
About 3 hours of study
Learning objectives
- Choose between polling, interrupts and DMA
- Apply Amdahl's and Gustafson's laws
- Follow MESI states and explain false sharing
Lessons
- 1
Input and output: polling, interrupts and DMA Intermediate
How the processor talks to devices: memory-mapped I/O, polling, interrupts and how they are handled, and direct memory access.
- 2
Parallel processors and multicore Advanced
Doing many things at once: Flynn's taxonomy, multicore processors and cache coherence, GPUs, and the limits set by Amdahl's law.
- 3
Cache coherence and the MESI protocol Advanced
How cores that each keep a private cache agree on the value of shared data: write-invalidate, the four MESI states, false sharing and memory consistency.
Module practice
- CPU cost of an I/O transferEasy
- Serve interrupts by priorityMedium
- Nested interruptsHard
- Amdahl's lawEasy
- Amdahl and Gustafson side by sideMedium
- Adding numbers on many processorsHard
- Do two variables share a blockEasy
- Count misses and invalidationsMedium
- Follow the MESI statesHard