Re: JavaMemoryModel: Introductions...

From: Paul Haahr (
Date: Sat Jun 26 1999 - 15:46:01 EDT

> How about introductions?

I'm the CTO of a small venture that wrote a Java-to-native compiler and
is licensing that technology to a server hardware company. (We're using
fellow list member V. C. Sreedhar's algorithm for converting to SSA form.)

My interest in redefining the memory model is mostly pragmatic, and I
don't think I have the experience with MP systems or reasoning about
concurrency to contribute as much as the heavyweights on the list, but
I'm happy to help or kibbitz where it's useful.

Bill's ``Reads Kill in Java'' note alerted me to this whole issue, and
it has kept me up at nights worrying that the product we've shipped is
fundamentally broken because, of course, we cache reads. But, since
it's now clear that any real compiler or relaxed consistency MP hardware
will have the same characteristics, I'm happy that everybody seems on
board to find a new memory model which reflects our intuitions of how
Java works.

I'm also glad to see the consensus around fixing the constructor
problems. They haven't bitten us, yet, because our customer is not
currently shipping MP systems, but I want to figure what the right thing
to do is, before we hit that problem. So far, I like Bill's suggestion
of inserting memory barriers between the end of an invoker and first
escape of that object. (But it appears to me that escape during any
constructor -- the ``shoot yourself in the foot'' scenario -- also needs
to be guarded with a memory barrier, to prevent garbage being used.)

My preference for our approach would be to define everything at the JVM
level, and then define (or postulate) a mapping from Java source to the
virtual machine. (The absence of such an explicit mapping is, I think,
a major headache, but I don't want to hold up redefinition of the memory
model for a formal definition of what javac is supposed to do. Perhaps
a grad student out there would like start on one?)

In sum, I agree with all that Bill has suggested so far, and would love
to see this project completed with all deliberate speed.

This is the JavaMemoryModel mailing list, managed by Majordomo 1.94.4.

To send a message to the list, email
To send a request to the list, email and put
your request in the body of the message (use the request "help" for help).
For more information, visit

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