[concurrency-interest] question the about the JMM

Larry Riedel larryr at saturn.sdsu.edu
Wed Dec 5 18:37:36 EST 2007


> one of the problems with the difference between reasoning in
> cache invalidation and happens before relations, is that with
> the former the following sounds very plausible: a release of
> lock X (that causes a cache invalidation) and an acquire of
> lock Y (that causes a cache update) is a usable mechanism to
> make all changes from one thread visible in another.

I hope it is fair to presume any sane cache coherence
protocol maintains consistency at a level of granularity far
far smaller than the entire cache!  I would agree it would
be ludicrous to model the entire memory space of a thread
as one giant blob which gets invalidated every time a lock
is acquired/released!  The only changes I would expect to
be made visible in the above case are those made to values
in the memory blocks associated with the acquire/release of
both lock X and lock Y.  And in Java, if X is not Y, I do
not think any presumptions are supposed to be made about
which values those are, without additional information.


Larry



More information about the Concurrency-interest mailing list