Store Atomicity: Giving Meaning to Loads and Stores in Shared Memory SystemsArvind & Jan-Willem Maessen (SUN)AbstractWe suggest that popular memory models, such as SC, Sun's TSO and RMO, and PowerPC's WO, should be thought of in terms of two orthogonal components: Purely local reordering of instructions plus Store Atomicity. We capture local ordering in an execution graph. Store Atomicity imposes additional dependency edges between memory operations to a given location in different threads (for example, every load depends upon the store which provides its value). This separation resolves the mystery of why cache consistency protocols for most memory models are so similar: all they do is enforce Store Atomicity. Unlike SC, for weak memory models no adequate procedures exist for enumerating the legal behaviors of programs. This invariably leads to misunderstandings about which behaviors are permitted by the specification. We give a procedure for generating all legal behaviors of a program under a weak memory model similar to RMO or WO. The rules for Store Atomicity attempt to impose minimal constraints among operations on different processors. Actual implementations employ simple mechanisms, but are significantly more conservative than required. This research will provide a definitional framework which will permit us and others to exploit the gap between current implementations and the less restrictive requirements of store atomicity. Approach
This will not generate all legal behaviors because address aliasing and control dependencies are revealed dynamically as a program executes. Address and control speculation further complicate matters. Instead we provide an algorithm for generating the execution graph of a multithreaded shared memory program where the execution dynamically renames registers, and data dependence and control edges are drawn after each operation. Our procedure also permits speculation where the generated graph may have to be rejected later when an inconsistency is revealed. Each execution graph corresponds to a legal execution of the program. We believe we have presented the first adequate procedure for enumeration. Research SupportPartial funding for this work has been provided by the IBM agreement number W0133890 as a part of DARPA's PERCS Projects. |
||
|