Previous | Next --- Slide 39 of 90
Back to Lecture Thumbnails
rmjones

In a sequentially consistent system, we would only expect to ever see "1" printed as output. Under the weaker assumptions of Partial Store Ordering, however, Processor 1 could reorder Thread 1's write operations and perform flag = 1 before it performs A = 1. Here it's completely possible for Thread 2 to break out of the while loop and print A before A = 1 is performed on Processor 1, which would give an otherwise unexpected output of "0" (or whatever A's initial value is).

Please log in to leave a comment.