Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
Java Memory Model Examples: Good, Bad and Ugly
 

Summary: Java Memory Model Examples:
Good, Bad and Ugly
David Aspinall and Jaroslav Sevc┤ik
August 8, 2007
Abstract
We review a number of illustrative example programs for the Java
Memory Model (JMM) [6, 3], relating them to the original design goals
and giving intuitive explanations (which can be made precise). We con-
sider good, bad and ugly examples. The good examples are allowed be-
haviours in the JMM, showing possibilities for non sequentially consistent
executions and reordering optimisations. The bad examples are prohibited
behaviours, which are clearly ruled out by the JMM. The ugly examples
are most interesting: these are tricky cases which illustrate some prob-
lem areas for the current formulation of the memory model, where the
anticipated design goals are not met. For some of these we mention possi-
ble fixes, drawing on knowledge we gained while formalising the memory
model in the theorem prover Isabelle [1].
1 Introduction
The Java Memory Model (JMM) [6, 3] is a relaxed memory model which acts as
a contract between Java programmers, compiler writers and JVM implementors.

  

Source: ┴brahßm, Erika - Fachgruppe Informatik, Rheinisch Westfńlische Technische Hochschule Aachen (RWTH)

 

Collections: Computer Technologies and Information Sciences