Multicore & Synchronization
Which describes the snooping approach to cache coherence?
- AThe OS periodically inspects every cache and fixes discrepancies
- BEach core's cache watches other cores' reads and writes on a shared bus or similar and updates its own line states
- CThe programmer manually sends values to other cores on each write
Show answer and explanation
Answer: B. Each core's cache watches other cores' reads and writes on a shared bus or similar and updates its own line states
In snooping, every core's read and write requests reach all caches, and each cache checks whether it holds the same line and invalidates it or supplies data. It is simple and suits a small number of cores. As cores increase, broadcasting every request to every cache generates too much traffic, so large systems use directory-based coherence.
- A. Hardware does it automatically.
- B. Correct. The caches snoop on the traffic.
- C. The programmer need not be involved.