JavaMemoryModel: movement into synchronized blocks

From: Jeremy Manson (jmanson@cs.umd.edu)
Date: Fri Mar 30 2001 - 09:55:14 EST


> Am I correct in thinking the proposed models differ in the allowed movement
> of normal reads and writes into synchronized blocks?
>
> The CRF model allows normal memory operations above or below a synchronized
> block to move into the synchronized block, but the operational semantics
> model only allows normal memory operations below a synchronized block to
> move into the synchronized block.
>
> Right? What are the implications in terms of real code?

Well, I don't remember CRF, but ours does allow operations above or below
a synchronized block to move into the synchronized block, as long as you
don't change the semantics of the program by doing so. I actually thought
CRF didn't, but I am probably misremembering.

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



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