Multicore & Synchronization
What is the difference between cache coherence and a memory consistency model?
- AThey mean the same thing under different names
- BCoherence keeps values at the same address consistent; a consistency model governs the order in which operations on different addresses appear
- CCoherence is purely software, and consistency purely hardware
Show answer and explanation
Answer: B. Coherence keeps values at the same address consistent; a consistency model governs the order in which operations on different addresses appear
Coherence guarantees, for any single address, that all cores see its writes in the same order and eventually read the latest value. A consistency model specifies, when core 0 writes x and then y, in what orders other cores may observe those writes. Even with coherence, writes to different addresses can appear reordered, which is where barriers are needed.
- A. They address different problems.
- B. Correct. Both are needed to write correct parallel programs.
- C. Both involve hardware and software.