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

From: Hudson, Rick (rick.hudson@intel.com)
Date: Tue Nov 21 2000 - 10:33:14 EST


The difference of interest between SC and PO is that if two processors
perform multiple writes then all processors will observe the writes of each
of these processors in the order written (just as with SC) but the
interleaving of the writes may appear different to different processors. I'm
looking for algorithms where observing different interleavings of writes on
different processors breaks the algorithm.

Put another way, I'm trying to find useful algorithms where a total ordering
of stores is needed instead of a partial ordering of the stores.

In your example, all of writes from a single processor will be ordered so if
the initialization and installation of the write bucket all happens on the
same processor then everything should be, as you say, hunky dorey.

Thanks for the Huelsbergen and Winterbottom pointer, I'll take a look at it.

- Rick Hudson

-----Original Message-----
From: David F. Bacon [mailto:dfb@watson.ibm.com]
Sent: Tuesday, November 21, 2000 6:33 AM
To: rick.hudson@intel.com
Cc: javamemorymodel@cs.umd.edu
Subject: Re: JavaMemoryModel: Volatiles - where does SC work and PO
doesn't?

i don't recall the distinctions between PSO and RMO on Sparc, but if what
you're talking about is like the weak consistency enforced by PowerPC and
Alpha, then....

the best example is a hash table which is read without locking. if you have
SC, you can rely on being able to completely initialize a new bucket, and
then
insert it into the table with a single write. if the unsynchronized readers
see the write that inserts the bucket, they will see the "previous" writes
that
initialized the bucket, and everything is hunky dorey. on the other hand,
with
a weaker consistency model, there is no such guarantee and the readers might
see a new bucket with unitialized values in it.

another example i came across recently was in the concurrent GC of
Huelsbergen
and Winterbottom, which relies on SC to implement read and write barriers
that
don't require heavyweight synchronization (see PPoPP'93).

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

-------------------------------
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