Search code examples
distributed-computingsequentialdistributed-system

Why is this output wrong ? - Sequential Consistency


The way I understand sequential consistency model the output marked as wrong should be valid, what am I missing ? enter image description here


Solution

  • If we take a look on the definition of sequential consistency in the wiki we'll see:

    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

    In your example the order of the P2 process is violated since the print (x,z) operation precedes y=1.