- Abstract:
-
We review a number of illustrative example programs for the Java Memory Model (JMM), relating them to the original design goals and giving intuitive explanations (which can be made precise). We consider good, bad and ugly examples. The good examples are allowed behaviours 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 problem areas for the current formulation of the memory model, where the anticipated design goals are not met. For some of these we mention possible fixes, drawing on knowledge we gained while formalising the memory model in the theorem prover Isabelle.
- Links To Paper
- 1st Link
- Bibtex format
- @InProceedings{EDI-INF-RR-1121,
- author = {
David Aspinall
and Jaroslav Sevcik
},
- title = {Java Memory Model Examples: Good, Bad and Ugly},
- book title = {VAMP 2007},
- year = 2007,
- month = {Sep},
- url = {http://groups.inf.ed.ac.uk/request/jmmexamples.pdf},
- }
|