RE: JavaMemoryModel: Question about implementation of java.util.concurrent.ConcurrentHashMap

From: Sylvia Else (sylviae@optushome.com.au)
Date: Thu Nov 13 2003 - 22:56:36 EST


At 02:33 PM 14/11/2003, Evan Ireland wrote:
>Does anyone know how much, for example, a full read barrier at
>volatile read costs compared with just fetching the one volatile
>from main memory?

This question has arisen here recently in a slightly different context,
because I was concerned about it.

The answer is really that you cannot assume that reading a volatile with
these memory model semantics necessarily involves the high cost of flushing
a cache. The memory cache implementors are able to provide solutions that
avoid this for the significant occurrences, and make volatile reads quite
efficient.

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:53 EDT