0

from what I understand: directory based system is more server centric design and snooping is more peer to peer centric.

That is why directory based requires less messages for any read-miss as it can reach the processor who has the valid data after checking the directory.

Snooping just asks every other processor which is n-1 messages.

So directory based systems scales more.

Now my questions is : if there is only one central directory then doesn't it face a bottleneck when too many processors are asking after a read miss?

curiousguy
  • 8,038
  • 2
  • 40
  • 58

1 Answers1

1

If the scenario that you're asking about is: what happens if all (or N-1) processors simultaneously have a read miss (this will generally generate a read shared message), then yes, all N-1 processors will send a message to the directory and all will need a response. This scenario can really only happen frequently when every processor is waiting on the same spinlock. The solution isn't to fix the coherence protocol (though, there are plenty of options for doing that), but rather to use a better algorithm. Generally people use queue based locking algorithms (for example, the famous Mellor-Crummey and Scott lock algorithm).

Spin locks are analagous to everyone simultaneously asking "are we there yet?" over and over. With queue based locks, everyone takes a number and gets in line. Then when the resource becomes available, the next guy in line gets it with a direct notification on a private variable.

Just to clarify something, while there is (usually) logically one central directory, it's not all physically in one place. The directory entries for a particular memory location are usually co-located on the processor that has the physical DRAM backing that memory.

Nathan Binkert
  • 8,744
  • 1
  • 29
  • 37