RE: JavaMemoryModel: Volatiles - where does SC work and PO doesn't

From: Jeremy Manson (jmanson@cs.umd.edu)
Date: Tue Nov 21 2000 - 13:35:27 EST


> All processors will see writes made by a particular processor in the order
> written, aka processor order.

Let me make sure I understand this. To illustrate the difference,
initially, A = B = 0.

P1
A = 1

P2
u = A
v = B

P3
B = 1

P4
w = B
x = A

The result u = 1, v = 0, w = 1, x = 0 is possible under PO but not SC.
Is that right?

Obviously, this in and of itself isn't terribly useful. Is it difficult
to contrive an example where this pattern is used?

                                        Jeremy
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:28 EDT