Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Fences in weak memory models (extended version)

Published: 01 April 2012 Publication History

Abstract

We present a class of relaxed memory models, defined in Coq, parameterised by the chosen permitted local reorderings of reads and writes, and by 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. These tests can be used to explore the behaviour of processor implementations and the behaviour of models, and hence to compare the two against each other. We detail the results of experiments on Power and a model we base on them.

References

[1]
A formal specification of Intel Itanium processor family memory ordering, October 2002. Intel Document 251429-001.
[2]
Adir A, Shurek G (2002) Generating concurrent test-programs with collisions for multi-processor verification. In: HLDVT.
[3]
Adir A, Attiya H, Shurek G (2003) Information-flow models for shared Memory with an application to the PowerPC architecture. In: TPDS.
[4]
Adve SV, Gharachorloo K (1995) Shared memory consistency models: a tutorial. Computer 29:66-76.
[5]
Ahamad M, Bazzi RA, John R, Kohli P, Neiger G (1993) The power of processor consistency. In: SPAA.
[6]
Alglave J A shared memory poetics. PhD thesis, Université Paris 7 and INRIA, 26 November 2010. http://diy.inria.fr/alglave-thesis.pdf
[7]
Alglave J, Fox A, Ishtiaq S, Myreen MO, Sarkar S, Sewell P, Zappa Nardelli F (2009) The semantics of Power and ARM multiprocessor machine code. In: DAMP.
[8]
Alglave J, Maranget L, Sarkar S, Sewell P (2010) Fences in weak memory models. In: CAV.
[9]
Alpha Architecture Reference Manual, 4th edn (2002).
[10]
AMD64 Architecture Programmer's Manual. Advanced Micro Devices, September 2007. (3 vols).
[11]
ARM Architecture Reference Manual (ARMv7-A and ARMv7-R), April 2008.
[12]
Arvind, Maessen J-W (2006) Memory model = instruction reordering + store atomicity. In: ISCA. IEEE Comput Soc, Los Alamitos.
[13]
Bertot Y, Casteran P (2004) In: Coq'Art. EATCS texts in theoretical computer science. Springer, Berlin.
[14]
Boehm H-J, Adve SV (2008) Foundations of the C++ concurrency memory model. In: PLDI.
[15]
Burckhardt S, Musuvathi M (2008) Effective program verification for relaxed memory models. In: CAV.
[16]
Cantin J, Lipasti M, Smith J (2003) The complexity of verifying memory coherence. In: SPAA.
[17]
Collier WW (1992) Reasoning about parallel architectures. Prentice Hall, New York.
[18]
Hangal S, Vahia D, Manovit C, Lu J-YJ, Narayanan S (2004) TSOTool: a program for verifying memory systems using the memory consistency model. In: ISCA.
[19]
Higham L, Kawash J, Verwaal NWeak memory consistency models part I: Definitions and comparisons. Technical Report98/612/03, Department of Computer Science, The University of Calgary, January 1998.
[20]
Intel 64 and IA-32 Architectures Software Developer's Manual (5 vols). Intel Corporation, March 2010. rev. 34.
[21]
Lamport L (1979) How to make a correct multiprocess program execute correctly on a multiprocessor. IEEE Trans Comput 46(7):779-782.
[22]
Landin A, Hagersten E, Haridi S (1991) Race-free interconnection networks and multiprocessor consistency. Comput Archit News 19(3):106-115.
[23]
Manson J, Pugh W, Adve SV (2005) The Java memory model. In: POPL.
[24]
Owens S, Sarkar S, Sewell P (2009) A better x86 memory model: x86-TSO. In: TPHOL.
[25]
Power ISA version 2.06, January 2009.
[26]
Sarkar S, Sewell P, Zappa Nardelli F, Owens S, Ridge T, Braibant T, Myreen M, Alglave J (2009) The semantics of x86-CC multiprocessor machine code. In: POPL.
[27]
Sarkar S, Sewell P, Alglave J,Maranget L,Williams D (2011) Understanding Power multiprocessors. In: PLDI.
[28]
Sewell P, Sarkar S, Owens S, Zappa Nardelli F, Myreen MO (2010) x86-TSO: a rigorous and usable programmer's model for x86 multiprocessors. Commun ACM 53(7):89-97. (Research Highlights).
[29]
Shasha D, Snir M (1988) Efficient and correct execution of parallel programs that share memory. ACM Trans Program Lang Syst 10(2):282-312.
[30]
Sparc Architecture Manual Versions 8 and 9, 1992 and 1994.
[31]
Yang Y, Gopalakrishnan G, Linstrom G, Slind K (2004) Nemos: a framework for axiomatic and executable specifications of memory consistency models. In: IPDPS.
[32]
Yang Y, Gopalakrishnan G, Lindstrom G (2007) UMM: an operational memory model specification framework with integrated model checking capability. In: CCPE.

Cited By

View all
  • (2024)Mix Testing: Specifying and Testing ABI Compatibility of C/C++ Atomics ImplementationsProceedings of the ACM on Programming Languages10.1145/36897278:OOPSLA2(442-467)Online publication date: 8-Oct-2024
  • (2022)Consistency-preserving propagation for SMT solving of concurrent program verificationProceedings of the ACM on Programming Languages10.1145/35633216:OOPSLA2(929-956)Online publication date: 31-Oct-2022
  • (2022)CAAT: consistency as a theoryProceedings of the ACM on Programming Languages10.1145/35632926:OOPSLA2(114-144)Online publication date: 31-Oct-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Formal Methods in System Design
Formal Methods in System Design  Volume 40, Issue 2
April 2012
165 pages

Publisher

Kluwer Academic Publishers

United States

Publication History

Published: 01 April 2012

Author Tags

  1. Fences
  2. Formal proofs
  3. Generic framework
  4. PowerPC
  5. Testing tool
  6. Weak memory models

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 30 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Mix Testing: Specifying and Testing ABI Compatibility of C/C++ Atomics ImplementationsProceedings of the ACM on Programming Languages10.1145/36897278:OOPSLA2(442-467)Online publication date: 8-Oct-2024
  • (2022)Consistency-preserving propagation for SMT solving of concurrent program verificationProceedings of the ACM on Programming Languages10.1145/35633216:OOPSLA2(929-956)Online publication date: 31-Oct-2022
  • (2022)CAAT: consistency as a theoryProceedings of the ACM on Programming Languages10.1145/35632926:OOPSLA2(114-144)Online publication date: 31-Oct-2022
  • (2021)Armed CatsACM Transactions on Programming Languages and Systems10.1145/345892643:2(1-54)Online publication date: 23-Jul-2021
  • (2019)Abstract Semantic DependencyStatic Analysis10.1007/978-3-030-32304-2_19(389-410)Online publication date: 8-Oct-2019
  • (2018)Frightening Small Children and Disconcerting Grown-upsACM SIGPLAN Notices10.1145/3296957.317715653:2(405-418)Online publication date: 19-Mar-2018
  • (2018)Frightening Small Children and Disconcerting Grown-upsProceedings of the Twenty-Third International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3173162.3177156(405-418)Online publication date: 19-Mar-2018
  • (2017)Coalition, intrigue, ambush, destruction and prideProceedings of the 17th Conference on Formal Methods in Computer-Aided Design10.5555/3168451.3168455(6-6)Online publication date: 2-Oct-2017
  • (2017)Effective Verification for Low-Level Software with Competing InterruptsACM Transactions on Embedded Computing Systems10.1145/314743217:2(1-26)Online publication date: 7-Dec-2017
  • (2016)The virtues of conflictACM SIGPLAN Notices10.1145/3016078.285116551:8(1-12)Online publication date: 27-Feb-2016
  • Show More Cited By

View Options

View options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media