JavaMemoryModel: How bad are incorrectly synchronized programs?

From: victor.luchangco@sun.com
Date: Thu Jul 31 2003 - 04:30:56 EDT


On Tuesday, I was strongly disabused of the notion that we might want
to provide guarantees to help programmers write correct but incorrectly
synchronized code. Nonetheless, in talking with some people, I still
get the impression that they want to be able to write incorrectly
synchronized programs in some particular (and very restricted) cases.
So I have the following question:

Assuming we had the technology, would we want to rule out incorrectly
synchronized programs? That is, suppose the compiler determines that
there is a data race in your program. Should it refuse to compile
your program (as it would if the program were badly typed)? If not,
why not? (Remember, we're assuming that we can decide whether a
program is correctly synchronized, just like it decides whether a
program is well-typed--no false positives or negatives.)

                                         Victor

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



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