Module 9: Addendum to Module 6: Shared Memory Multiprocessors
  Lecture 18: Sharing Patterns and Cache Coherence Protocols
 


Invalidation vs. Update

  • Two main classes of protocols:
    • Dictates what action should be taken on a store
    • Invalidation-based protocols invalidate sharers when a store miss appears
    • Update-based protocols update the sharer caches with new value on a store
    • Advantage of update-based protocols: sharers continue to hit in the cache while in invalidation-based protocols sharers will miss next time they try to access the line
    • Advantage of invalidation-based protocols: only store misses go on bus and subsequent stores to the same line are cache hits
  • When is update-based protocol good?
    • What sharing pattern? (large-scale producer/consumer)
    • Otherwise it would just waste bus bandwidth doing useless updates
  • When is invalidation-protocol good?
    • Sequence of multiple writes to a cache line
    • Saves intermediate write transactions
  • Overhead of initiating small updates
    • Invalidation-based protocols are much more popular
    • Some systems support both or maybe some hybrid based on dynamic sharing pattern of a cache line