Re: JavaMemoryModel: A memory model for the masses

From: Joshua Bloch (jbloch@eng.sun.com)
Date: Mon Nov 08 1999 - 14:34:12 EST


Folks,

   I have, unfortunately, not had the time to keep up with this discussion of
late. In fact, I haven't read the last 50 or so messages in any detail, but
I'm still going to throw in my ill-informed 2 cents.

    It's sheer lunacy to even think seriously about a model that breaks a
simple "single check" idiom applied to integers. It's wildly counterintuitive.
All it does is to ensure that Joe Programmer (not to be confused with Joe
Bowbeer) will rarely, if ever, write a correct, non-trivial multithreaded
program. At the very least, it would demand a massive re-education program.

   I believe that we must support a memory model that lets Joe Programmer write
correct code without knowing that there is such a thing as a memory model. Joe
Programmer has a hard enough time just thinking of synchronized blocks in terms
of their mutual exclusion effects. We simply can't make him worry about
visibility effects.

    While I'm pretty much totally ignorant on the topic, I have a very hard
time believing that such a memory model will really reduce performance by a
factor of 2-3, except perhaps on some exotic MPs

                                  Josh

P.S. to Joe. Add Bill Joy and Guy Steele (who seems to be getting genius
awards these days than all of the McArthur Foundation fellows put together) to
the list of luminaries who didn't fully appreciate the impact of the memory
model on concurrent programming.

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



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