RE: JavaMemoryModel: Question about the semantics of volatile

From: Sarita Adve (sadve@cs.uiuc.edu)
Date: Thu Mar 18 2004 - 11:23:56 EST


> > If weak supports the common programming idioms then why not mandate
> > weak, with the justification that it requires less of the
> > implementation?
> >
> > Best,
> > Vijay
> >
>
> Because some people want to go beyond the common programming idioms.
>
> I cited examples where the strong interpretation allows people to
> write efficient concurrent idioms that could not be implemented with
> the weak interpretation.
>
> The real question (to my mind) is whether or not we can cite any
> examples
> where the strong interpretation imposes a higher implementation cost.
>
> I believe that both the Treadmarks DSM implementation and
> IA-64 st.rel
> and ld.acq
> semantics support the strong interpretation directly.
>
> Bill

As I said in my message last night, Treadmarks doesn't support the types of
idioms we want to support with the strong interpretation (unless Sandhya and
I completely misunderstood each other and my recollection from the days of
working on Treadmarks is incorrect). So the fact that it supports the
strong interpretation doesn't seem too meaningful for this discussion - it
does so by default since there is no difference between the strong and weak
interpretations for the types of programs Treadmarks supports.

One reason for the above, in my (speculative) opinion, is that establishing
a total ordering is hard on distributed systems.

I also went back and re-read the original ISCA'92 Treadmarks paper, and
again, communication is established only between the last writer and the
reader. But again, it's not too useful to know this because there is only
one last writer in all those programs.

Again, although my preference is for the weaker interpretation, I don't
believe this is a huge deal. I am just trying to make sure we are making an
informed decision. Please let me know if I am missing something here.

Sarita

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



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