RE: JavaMemoryModel: Specification

From: Keith Randall (randall@src.dec.com)
Date: Tue Jul 10 2001 - 17:52:02 EDT


> (1) A specification of programs for which the system will appear
> sequentially consistent. Call these correctly synchronized programs.
>
> (2) A specification that states behavior for incorrectly synchronized
> programs.

I would rewrite (2) as follows:

(2) A specification that states behavior for all programs.

   I believe Bill is saying (and I agree, if that is in fact what he
is saying) that (1) should be derivable from (2). (2) is the spec,
(1) is a set of programming rules that, if followed, makes a program
appear sequentially consistent. These rules would embody the notion
of a correctly synchronized program.

   The worry is that if (1) is specified independently, than it might
guarantee more than what is derivable from (2). In fact, you suggest
that (1) will guarantee more than what is derivable from (2). But
then the JVM must detect whether your program is correctly
synchronized to decide whether to give you the additional guarantees
or not. I don't think that this is a task we want the JVM to do.

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



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