The .Java memory model described in Chapter 17 of the .Jwva Language Specification gives constraints on how t.hreads iut,eract, through memory. The Java memory model is hard to int,erpret, and poorly understood; it imposes coiist,raint,s t,lint. prohibit, common compiler opt,imizatious and are expensive to implement on existing hardware. At least, one shipping optimizing Java compiler violates the constraints of the existing Java memory model. 'These issues are part,icularly important for lligll-pc~rforln~\iice Java. applications, since they are more likely t.o llse and need aggressive opt,imizing compilers illltl plrdlel processors. 111 atltlit,ion, programming idioms used by some programmc~s and used within Sun's Java. Development Kit is not. guarant,eed t,o be valid according the existing Java lllellloly 111otlcl. This paper reviews these issues and suggests replacement memory models for Java.
The problems of the Java memory model are characterized succinctly by Pugh REF .
Fixing the Java memory model
JAVA '99
Computer Science