Lect10 SMPCC
Lect10 SMPCC
Ideal effect:
o Large memory bandwidth
o Low memory latency
Due to the cache copies of the memory, different processors may see
the different values of the same memory location.
Processors see different values for u after event 3.
With a write-back cache, memory may store the stale date.
Bus Snoopy Cache Coherence protocols
Memory: centralized with uniform access time and bus interconnect.
Bus Snooping idea
Send all requests for data to all processors (through the bus)
Processors snoop to see if they have a copy and respond accordingly.
o Cache listens to both CPU and BUS.
o The state of a cache line may change by (1) CPU memory operation, and (2)
bus transaction (remote CPU’s memory operation).
Requires broadcast since caching information is at processors.
o Bus is a natural broadcast medium.
o Bus (centralized medium) also serializes requests.
Types of snoopy bus protocols
Write invalidate protocols
o Write to shared data: an invalidate is sent to the bus (all caches snoop and
invalidate copies).
Write broadcast protocols (typically write through)
o Write to shared data: broadcast on bus, processors snoop and update any
copies.
An Example Snoopy Protocol (MSI)
Invalidation protocol, write-back cache
Each block of memory is in one state
o Clean in all caches and up-to-date in memory (shared)
o Dirty in exactly one cache (exclusive)
o Not in any cache
Similar idea as MSI protocol, but the interconnect does not have broadcast.
o Use a directory to record where (who the owner is) of each memory line.
Use a directory for each cache line to track the state of every block in the
cache.
o Can also track the state for all memory blocks directory size = O(memory size).