Advertisement

Fences in Weak Memory Models

  • Jade Alglave
  • Luc Maranget
  • Susmit Sarkar
  • Peter Sewell
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6174)

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.

Keywords

Memory Model Memory Event Sequentially Consistent Litmus Test Program Order 
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

  1. 1.
    Adir, A., Attiya, H., Shurek, G.: Information-Flow Models for Shared Memory with an Application to the PowerPC Architecture. In: TPDS (2003)Google Scholar
  2. 2.
    Adir, A., Shurek, G.: Generating Concurrent Test-Programs with Collisions for Multi-Processor Verification. In: HLDVT (2002)Google Scholar
  3. 3.
    Adve, S.V., Gharachorloo, K.: Shared Memory Consistency Models: A Tutorial. IEEE Computer 29, 66–76 (1995)Google Scholar
  4. 4.
    Ahamad, M., Bazzi, R.A., John, R., Kohli, P., Neiger, G.: The Power of Processor Consistency. In: SPAA (1993)Google Scholar
  5. 5.
    Alpha Architecture Reference Manual, 4th edn. (2002)Google Scholar
  6. 6.
    ARM Architecture Reference Manual (ARMv7-A and ARMv7-R) (April 2008)Google Scholar
  7. 7.
    Arvind, Maessen, J.-W.: Memory Model = Instruction Reordering + Store Atomicity. In: ISCA, IEEE Computer Society, Los Alamitos (2006)Google Scholar
  8. 8.
    Bertot, Y., Casteran, P.: Coq’Art. EATCS Texts in Theoretical Computer Science. Springer, Heidelberg (2004)zbMATHGoogle Scholar
  9. 9.
    Boehm, H.-J., Adve, S.V.: Foundations of the C++ Concurrency Memory Model. In: PLDI (2008)Google Scholar
  10. 10.
    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)CrossRefGoogle Scholar
  11. 11.
    Cantin, J., Lipasti, M., Smith, J.: The Complexity of Verifying Memory Coherence. In: SPAA (2003)Google Scholar
  12. 12.
    Collier, W.W.: Reasoning About Parallel Architectures. Prentice-Hall, Englewood Cliffs (1992)zbMATHGoogle Scholar
  13. 13.
    Dubois, M., Scheurich, C.: Memory Access Dependencies in Shared-Memory Multiprocessors. IEEE Transactions on Software Engineering 16(6) (June 1990)Google Scholar
  14. 14.
    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)Google Scholar
  15. 15.
    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)Google Scholar
  16. 16.
    A Formal Specification of Intel Itanium Processor Family Memory Ordering . Intel Document 251429-001 (October 2002)Google Scholar
  17. 17.
    Lamport, L.: How to Make a Correct Multiprocess Program Execute Correctly on a Multiprocessor. IEEE Trans. Comput. 46(7), 779–782 (1979)CrossRefMathSciNetGoogle Scholar
  18. 18.
    Landin, A., Hagersten, E., Haridi, S.: Race-free interconnection networks and multiprocessor consistency. SIGARCH Comput. Archit. News 19(3), 106–115 (1991)CrossRefGoogle Scholar
  19. 19.
    Manson, J., Pugh, W., Adve, S.V.: The Java Memory Model. In: POPL (2005)Google Scholar
  20. 20.
    Owens, S., Sarkar, S., Sewell, P.: A Better x86 Memory Model: x86-TSO. In: TPHOL (2009)Google Scholar
  21. 21.
    Power isa version 2.06 (2009)Google Scholar
  22. 22.
    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)Google Scholar
  23. 23.
    Shasha, D., Snir, M.: Efficient and Correct Execution of Parallel Programs that Share Memory. ACM Trans. Program. Lang. Syst. 10(2), 282–312 (1988)CrossRefGoogle Scholar
  24. 24.
    Sparc Architecture Manual Versions 8 and 9 (1992/1994)Google Scholar
  25. 25.
    Yang, Y., Gopalakrishnan, G., Lindstrom, G.: UMM: an Operational Memory Model Specification Framework with Integrated Model Checking Capability. In: CCPE (2007)Google Scholar
  26. 26.
    Yang, Y., Gopalakrishnan, G., Linstrom, G., Slind, K.: Nemos: A Framework for Axiomatic and Executable Specifications of Memory Consistency Models. In: IPDPS (2004)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Jade Alglave
    • 1
  • Luc Maranget
    • 1
  • Susmit Sarkar
    • 2
  • Peter Sewell
    • 2
  1. 1.INRIA 
  2. 2.University of Cambridge 

Personalised recommendations