Module 6: Shared Memory Multiprocessors: Consistency and Coherence
  Lecture 11: Introduction to Snoopy Coherence
 


Consistency Model

  • A multiprocessor normally advertises the supported memory consistency model
    • This essentially tells the programmer what the possible correct outcome of a program could be when run on that machine
    • Cache coherence deals with memory operations to the same location, but not different locations
    • Without a formally defined order across all memory operations it often becomes impossible to argue about what is correct and what is wrong in shared memory
  • Various memory consistency models
    • Sequential consistency (SC) is the most intuitive one and we will focus on it now (more consistency models later)

Sequential Consistency

  • Total order achieved by interleaving accesses from different processors
  • The accesses from the same processor are presented to the memory system in program order
  • Essentially, behaves like a randomly moving switch connecting the processors to memory
    • Picks the next access from a randomly chosen processor
  • Lamport's definition of SC
    • A multiprocessor is sequentially consistent if the result of any execution is the same as if the operations of all the processors were executed in some sequential order, and the operations of each individual processor appear in this sequence in the order specified by its program