> The problem is that the other threads may presuambly be system threads, and
> thus there may not be visible progress. In fact gcj, for example,
> implements this with sched_yield() which, at least on Linux, can yield to
> another process entirely. (I'm not sure what else it could reasonably do on
> Linux.) I suspect the standard VMs do something similar. Cliff?
The Sun Linux VM does essentially the above.
The Sun Solaris VM calls (roughly) Solaris thr_yield() which
yields to threads in that process of the same or greater
Stronger semantics may be somewhat contorted to implement, in general.
(on the other hand, we may not want implementation ease to drive specs...)
> Thus I'm
> not at all sure that even standard VMs currently satisfy the stronger
> semantics, unless you're very careful to define what you mean by
> My intuition is that the current spec has roughly the right level of
> ambiguity, and it would be nice to avoid changing it. If we have to say
> something specific, I would say that we are not prohibiting the
> transformations you describe, though they are strongly discouraged, and may
> (or may not) be prohibited by other parts of the Java specification.
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:37 EDT