Abstract
We present a class of relaxed memory models, defined in Coq, parameterised by the chosen permitted local reorderings of reads and writes, and the visibility of inter- and intra-processor communications through memory (e.g. store atomicity relaxation). We prove results on the required behaviour and placement of memory fences to restore a given model (such as Sequential Consistency) from a weaker one. Based on this class of models we develop a tool, diy, that systematically and automatically generates and runs litmus tests to determine properties of processor implementations. We detail the results of our experiments on Power and the model we base on them. This work identified a rare implementation error in Power 5 memory barriers (for which IBM is providing a workaround); our results also suggest that Power 6 does not suffer from this problem.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Adir, A., Attiya, H., Shurek, G.: Information-Flow Models for Shared Memory with an Application to the PowerPC Architecture. In: TPDS (2003)
Adir, A., Shurek, G.: Generating Concurrent Test-Programs with Collisions for Multi-Processor Verification. In: HLDVT (2002)
Adve, S.V., Gharachorloo, K.: Shared Memory Consistency Models: A Tutorial. IEEE Computer 29, 66–76 (1995)
Ahamad, M., Bazzi, R.A., John, R., Kohli, P., Neiger, G.: The Power of Processor Consistency. In: SPAA (1993)
Alpha Architecture Reference Manual, 4th edn. (2002)
ARM Architecture Reference Manual (ARMv7-A and ARMv7-R) (April 2008)
Arvind, Maessen, J.-W.: Memory Model = Instruction Reordering + Store Atomicity. In: ISCA, IEEE Computer Society, Los Alamitos (2006)
Bertot, Y., Casteran, P.: Coq’Art. EATCS Texts in Theoretical Computer Science. Springer, Heidelberg (2004)
Boehm, H.-J., Adve, S.V.: Foundations of the C++ Concurrency Memory Model. In: PLDI (2008)
Burckhardt, S., Musuvathi, M.: Effective Program Verification for Relaxed Memory Models. In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 107–120. Springer, Heidelberg (2008)
Cantin, J., Lipasti, M., Smith, J.: The Complexity of Verifying Memory Coherence. In: SPAA (2003)
Collier, W.W.: Reasoning About Parallel Architectures. Prentice-Hall, Englewood Cliffs (1992)
Dubois, M., Scheurich, C.: Memory Access Dependencies in Shared-Memory Multiprocessors. IEEE Transactions on Software Engineering 16(6) (June 1990)
Hangal, S., Vahia, D., Manovit, C., Lu, J.-Y.J., Narayanan, S.: TSOTool: A Program for Verifying Memory Systems Using the Memory Consistency Model. In: ISCA (2004)
Higham, L., Kawash, J., Verwaal, N.: Weak memory consistency models part I: Definitions and comparisons. Technical Report98/612/03, Department of Computer Science, The University of Calgary (January 1998)
A Formal Specification of Intel Itanium Processor Family Memory Ordering . Intel Document 251429-001 (October 2002)
Lamport, L.: How to Make a Correct Multiprocess Program Execute Correctly on a Multiprocessor. IEEE Trans. Comput. 46(7), 779–782 (1979)
Landin, A., Hagersten, E., Haridi, S.: Race-free interconnection networks and multiprocessor consistency. SIGARCH Comput. Archit. News 19(3), 106–115 (1991)
Manson, J., Pugh, W., Adve, S.V.: The Java Memory Model. In: POPL (2005)
Owens, S., Sarkar, S., Sewell, P.: A Better x86 Memory Model: x86-TSO. In: TPHOL (2009)
Power isa version 2.06 (2009)
Sarkar, S., Sewell, P., Zappa Nardelli, F., Owens, S., Ridge, T., Braibant, T., Myreen, M., Alglave, J.: The Semantics of x86-CC Multiprocessor Machine Code. In: POPL (2009)
Shasha, D., Snir, M.: Efficient and Correct Execution of Parallel Programs that Share Memory. ACM Trans. Program. Lang. Syst. 10(2), 282–312 (1988)
Sparc Architecture Manual Versions 8 and 9 (1992/1994)
Yang, Y., Gopalakrishnan, G., Lindstrom, G.: UMM: an Operational Memory Model Specification Framework with Integrated Model Checking Capability. In: CCPE (2007)
Yang, Y., Gopalakrishnan, G., Linstrom, G., Slind, K.: Nemos: A Framework for Axiomatic and Executable Specifications of Memory Consistency Models. In: IPDPS (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Alglave, J., Maranget, L., Sarkar, S., Sewell, P. (2010). Fences in Weak Memory Models. In: Touili, T., Cook, B., Jackson, P. (eds) Computer Aided Verification. CAV 2010. Lecture Notes in Computer Science, vol 6174. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14295-6_25
Download citation
DOI: https://doi.org/10.1007/978-3-642-14295-6_25
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-14294-9
Online ISBN: 978-3-642-14295-6
eBook Packages: Computer ScienceComputer Science (R0)