Multicore & Synchronization

Why do systems with many cores use directory-based coherence instead of snooping?

  1. ARecording which cores hold each line lets notices go only to the cores involved, reducing traffic
  2. BDirectory-based coherence makes caches unnecessary
  3. CDirectory-based coherence can notify all cores on every write
Show answer and explanation

Answer: A. Recording which cores hold each line lets notices go only to the cores involved, reducing traffic

Directory-based coherence keeps a table (the directory) recording, for each line, which cores hold copies and in what state. On a write, it consults the directory and sends invalidations only to the cores holding copies. With less traffic than snooping, which notifies all caches at once, it is used in CPUs with dozens of cores or more, such as server processors.

  • A. Correct. There is no need to broadcast to everyone.
  • B. Caches are still used.
  • C. Avoiding broadcast is the whole point.
Practice this topic Back to topic

More Multicore & Synchronization questions

  1. Coherence protocols can be invalidation-based or update-based. Why do most CPUs use invalidation?
  2. Which describes false sharing in a multithreaded program?
  3. False sharing occurs with an array of per-thread counters such as "long cnt[8];". What is the most suitable fix?
  4. Which describes a data race?
  5. When two threads run the code above simultaneously, the final counter can be less than 200000. Why?