There's Nothing Wrong with Out-of-Thin-Air: Compiler Optimization and Memory Models


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 some preliminary ideas for a simple concurrency semantics for Java that avoids basic problems at a cost of backward compatibility are presented.

Greg Steffan
Last modified: Fri Nov 14 11:15:53 EST 2008