The possible outputs are print one of the two, or none, but not both.
pdp
@hpark914: Those are the possible outputs assuming the two processors follow a sequentially consistent memory system. If sequential consistency is relaxed, read to B by thread 1 could occur before write to A and read to A in thread 2 could occur before write to B, in which case both will be printed.
The possible outputs are print one of the two, or none, but not both.
@hpark914: Those are the possible outputs assuming the two processors follow a sequentially consistent memory system. If sequential consistency is relaxed, read to B by thread 1 could occur before write to A and read to A in thread 2 could occur before write to B, in which case both will be printed.