Re: JavaMemoryModel: JMM and caches.

From: Sylvia Else (sylviae@optushome.com.au)
Date: Thu Oct 30 2003 - 20:22:12 EST


At 01:57 AM 31/10/2003, Bill Pugh wrote:
>Sylvia, I still think you are getting all worked up over something that
>won't be a problem. On ia64, a load.acquire will be very fast if the
>memory location is in cache. At any rate, on ia64, the only way to get the
>behavior you want is with a load.acquire.

It's true that I may be guilty of constructing a strawman argument in that
to some extent I'm making assumptions about how the memory model is
implemented, and then raising criticism on that basis.

One of my assumptions has been that a load.acquire will necessitate the
flushing of the cache. On reflection, I suppose it is practical for this to
be avoided where, as you say, the location is in cache, because if a
store.release had been performed elsewhere while the location was cached,
appropriate action could have been taken at that point. Since frequent
loading and rare storing of the the location is a prerequisite of the
problem I'm trying to solve, this obviates the issue.

Can one take the same view with synchronization? Is the whole
"synchronization is slow" paradigm, which lead to the double checked
singleton pattern, spurious?

Sylvia.

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



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