> -----Original Message-----
> From: email@example.com
> [mailto:firstname.lastname@example.org] On Behalf Of Bill Pugh
> Sent: Thursday, April 15, 2004 2:19 PM
> To: Sylvia Else
> Cc: javamemorymodel-cs.umd.edu; Joseph Bowbeer
> Subject: Re: JavaMemoryModel: Moving memory operations across
> external actions
> That is, essentially, the question.
> If one external operation influences another, should the compiler
> be required to conservatively treat that as a happens-before edge?
> We don't know whether or not that causality chain in the real world
> is correctly synchronized or not. In practice, some of them
> will be and
> might not. Do we require the compiler to treat them conservatively, or
> do we allow the compiler to assume that none of them are.
If this is really the essential question, I am skeptical that a
"one-size-fits-all" strategy will work. I think we have to allow the
external world to tell the JMM which hb edges (for external events) need to
be enforced and which shouldn't. The default for the compiler should be that
all edges should be enforced (unless it has system-specific info to relax
this) and the default for the programmer should be no edges are enforced
(unless there is system-specific information to relax this). Maybe for some
common I/O interactions, we could say something more concrete. But I really
think any more is outside the purview of the JMM.
For people wondering how we can formalize the above - one approach being
explored for the fairness issue is along similar lines and seems amenable to
formalization. This one should be too, but I think there's more to the
problem of external events than just this happens-before question and that
will influence the solution. More later...
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:04 EDT