There is nothing wrong with out-of-thin-air: compiler optimization and memory models

  • Authors:
  • Clark Verbrugge;Allan Kielstra;Yi Zhang

  • Affiliations:
  • McGill University, Montréal, Canada;IBM Toronto Lab, Markham, Canada;McGill University, Montréal, Canada

  • Venue:
  • Proceedings of the 2011 ACM SIGPLAN Workshop on Memory Systems Performance and Correctness
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Memory models are used in concurrent systems to specify visibility properties of shared data. A practical memory model, however, must permit code optimization as well as provide a useful semantics for programmers. Here we extend recent observations that the current Java memory model imposes significant restrictions on the ability to optimize code. Beyond the known and potentially correctable proof concerns illustrated by others we show that major constraints on code generation and optimization can in fact be derived from fundamental properties and guarantees provided by the memory model. To address this and accommodate a better balance between programmability and optimization we present ideas for a simple concurrency semantics for Java that avoids basic problems at a cost of backward compatibility.