Re: JavaMemoryModel: Use-case for strong volatile interpretation

From: Sylvia Else (sylviae@optushome.com.au)
Date: Mon Mar 29 2004 - 22:24:08 EST


At 05:36 PM 29/03/2004 -0500, Bill Pugh wrote:
>You have some sort of simulation/relaxation based algorithm,
>with a shared data structure, multiple threads that are updating
>the data structure and multiple threads reading the data structure.
>
>The updating threads do not have to synchronize among themselves,
>since they are updating disjoint sections of the shared data structure.
>
>The reading threads don't need to see any particular iteration of the
>update, or the most recent update. They just want to see data that isn't
>too far out of date.
>
>With the strong interpretation, it suffices to have a shared volatile, and
>each updating thread periodically write to the volatile, and each reading
>thread periodically read the volatile.

Sorry, but I'm a little sceptical here. Does even this use case have a
non-contrived implementation that is DRF under the strong definition, but
not under the weak one?

Sylvia.

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



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