In some cases this is not true.
Most machines these days violate sequential consistency in two ways.
If a machine is not write atomic, then the following test case (from [DSB86]) involving threads T0, T1, and T2, can occur.
Initially, A = B = X = Y = 0.
T0 T1 T2
A = 1; B = A; X = B;
Y = A;
Terminally, A = B = X = 1, Y = 0.
If the write into A is performed nonatomically, so that X
receives the new value of A (via B) while Y receives the old
value, then no number of fence instructions added to this code
will necessarily create a sequentially consistent result.
Last updated August 11, 2008.