ABSTRACT
Memory consistency litmus tests are small parallel programs that are designed to illustrate subtle differences between memory consistency models by exhibiting different outcomes for different models. In this paper, we show that for a class of memory models that is restricted yet expressive enough to include all store-atomic hardware memory models, litmus tests of a bounded size are sufficient for illustrating differences between memory consistency models in this class. We establish a bound of two threads and no more than six memory access instructions for differentiating litmus tests in this class of models. Thus, we can prove equivalence of two specification of memory consistency models in this class by exploring a bounded number of litmus tests. We build a tool for comparing memory models based on this result, and we use the tool to explore and map the space of this class of models.
- Sarita V. Adve and Kourosh Gharachorloo. Shared memory consistency models: A tutorial. IEEE Computer, 1996. Google ScholarDigital Library
- Sarita V. Adve and Mark D. Hill. Weak ordering - a new definition. In ISCA, 1990. Google ScholarDigital Library
- Jade Alglave, Luc Maranget, Susmit Sarkar, and Peter Sewell. Fences in weak memory models. In CAV, 2010. Google ScholarDigital Library
- Arvind and Jan-Willem Maessen. Memory model = instruction reordering + store atomicity. ISCA, 2006. Google ScholarDigital Library
- Sebastian Burckhardt and Madanlal Musuvathi. Effective program verification for relaxed memory models. In CAV, 2008. Google ScholarDigital Library
- Niklas Een and Niklas Sorensson. Minisat - a SAT solver with conflict-clause minimization. In SAT, 2005.Google Scholar
- Intel Corporation. Intel 64 and IA-32 Architectures Software Developer's Manual, March 2010.Google Scholar
- Leslie Lamport. Time, clocks, and the ordering of events in a distributed system. Commun. ACM, 21:558--565, 1978. Google ScholarDigital Library
- Leslie Lamport. How to make a multiprocessor computer that correctly executes multiprocess program. IEEE Transactions on Computers, 28(9):690--691, 1979. Google ScholarDigital Library
- Sela Mador-Haim, Rajeev Alur, and Milo Martin. Generating litmus tests for contrasting memory consistency models. In CAV, 2010. Google ScholarDigital Library
- Vijay A. Saraswat, Radha Jagadeesan, Maged Michael, and Christoph von Praun. A theory of memory models. In PPoPP, 2007. Google ScholarDigital Library
- Susmit Sarkar, Peter Sewell, Jade Alglave, Luc Maranget, and Derek Williams. Understanding POWER multiprocessors. In PLDI, 2011. Google ScholarDigital Library
- Richard L. Sites. Alpha Architecture Reference Manual. Prentice Hall PTR, 1992. Google ScholarDigital Library
- Robert C. Steinke and Gary J. Nutt. A unified theory of shared memory consistency. J. ACM, 51(5), 2004. Google ScholarDigital Library
- David L. Weaver and Tom Germond. The SPARC Architecture Manual Version 9. Prentice Hall PTR, 1994. Google ScholarDigital Library
- Yue Yang, Ganesh Gopalakrishnan, Gary Lindstrom, and Konrad Slind. Nemos: A framework for axiomatic and executable specifications of memory consistency models. IPDPS, 1, 2004.Google Scholar
Index Terms
- Litmus tests for comparing memory consistency models: how long do they need to be?
Recommendations
Synthesizing memory models from framework sketches and Litmus tests
PLDI 2017: Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and ImplementationA memory consistency model specifies which writes to shared memory a given read may see. Ambiguities or errors in these specifications can lead to bugs in both compilers and applications. Yet architectures usually define their memory models with prose ...
Automated Synthesis of Comprehensive Memory Model Litmus Test Suites
Asplos'17The memory consistency model is a fundamental part of any shared memory architecture or programming model. Modern weak memory models are notoriously difficult to define and to implement correctly. Most real-world programming languages, compilers, and (...
Automated Synthesis of Comprehensive Memory Model Litmus Test Suites
ASPLOS '17The memory consistency model is a fundamental part of any shared memory architecture or programming model. Modern weak memory models are notoriously difficult to define and to implement correctly. Most real-world programming languages, compilers, and (...
Comments