skip to main content
10.1145/2618128.2618134acmconferencesArticle/Chapter ViewAbstractPublication PagesmspConference Proceedingsconference-collections
research-article
Open access

Outlawing ghosts: avoiding out-of-thin-air results

Published: 13 June 2014 Publication History

Abstract

It is very difficult to define a programming language memory model for shared variables that both
• allows programmers to take full advantage of weakly-ordered memory operations, but still
• correctly disallows so-called "out-of-thin-air" results, i.e. results that can be justified only via reasoning that is in some sense circular.
Real programming language implementations do not produce out-of-thin-air results. Architectural specifications successfully disallow them. Nonetheless, the difficulty of disallowing them in language specifications causes real, and serious, problems. In the absence of such a specification, essentially all precise reasoning about non-trivial programs becomes impractical. This remains a critical open problem in the specifications of Java, C, and C++, among others.
We argue that there are plausible and relatively straight-forward solutions, but their performance impact requires further study. In the long run, they are likely to require strengthening of some hardware guarantees, so that they translate properly to guarantees at the programming language source level.

References

[1]
S. V. Adve and H.-J. Boehm. Memory models: A case for rethinking parallel languages and hardware. Communications of the ACM, 53(8):90--101, August 2010.
[2]
S. V. Adve and M. D. Hill. Weak ordering---A new definition. In Proceedings of the 17th International Symposium on Computer Architecture, pages 2--14, 1990.
[3]
M. Batty, M. Dodds, and A. Gotsman. Library abstraction for C/C++ concurrency. In Proceedings of the 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2013.
[4]
H.-J. Boehm. N3786: Prohibiting "out of thin air" results in C++14. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3786.htm, September 2013.
[5]
H.-J. Boehm and S. Adve. Foundations of the C++ concurrency memory model. In Proceedings of the Conference on Programming Language Design and Implementation, pages 68--78, 2008.
[6]
H.-J. Boehm et al. N3710: Specifying the absence of "out of thin air" results (LWG2265). http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3710.html, August 2013.
[7]
D. Demange, V. Laporte, L. Zhao, S. Jagannathan, D. Pichardie, and J. Vitek. Plan B: A buffered memory model for Java. In POPL, pages 329--342, 2013.
[8]
J. Gosling, B. Joy, G. Steele, G. Bracha, and A. Buckley. The Java language specification: Java SE 8 edition. http://docs.oracle.com/javase/specs/jls/se8/html/index.html, 2014.
[9]
ISO JTC1/SC22/WG14. ISO/IEC 9899:2011, information technology --- programming languages --- C. http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=57853 or an approximation at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf, 2011.
[10]
ISO JTC1/SC22/WG21. ISO/IEC 14882:2011, information technology --- programming languages --- C++. http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372 or a close approximation at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3376.pdf, 2011.
[11]
L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Transactions on Computers, C-28(9):690--691, 1979.
[12]
J. Manson, W. Pugh, and S. Adve. The Java memory model. In Proceedings of the Symposium on Principles of Programming Languages, 2005.
[13]
D. Marino, A. Singh, T. Millstein, M. Musuvathi, and S. Narayanasamy. A case for an SC-preserving compiler. In PLDI, pages 199--210, 2011.
[14]
B. Norris and B. Demsky. CDSChecker: Checking concurrent data structures written with C/C++ atomics. In "Proceeding of the 28th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications", 2013.
[15]
B. Pugh et al. JMM causality test cases. http://www.cs.umd.edu/~pugh/java/memoryModel/unifiedProposal/testcases.html, retrieved March, 2014.
[16]
S. Sarkar, P. Sewell, J. Alglave, L. Maranget, and D. Williams. Understanding POWER multiprocessors. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, 2011.
[17]
P. Sewell, S. Sarkar, S. Owens, F. Z. Nardelli, and M. O. Myreen. x86-TSO: A rigorous and usable programmer's model for x86 multiprocesors. Communications of the ACM, 53(7):89--97, July 2010.
[18]
I. SPARC International. The SPARC architecture manual (version 9). Prentice-Hall, Inc., 1994.
[19]
Reference Manual for the Ada Programming Language: ANSI/MIL-STD-1815A-1983 Standard 1003.1-2001. United States Department of Defense, 1983. Springer.
[20]
V. Vafeiadis and C. Narayan. Relaxed separation logic: A program logic for C11 concurrency. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications, 2013.
[21]
J. Ševčík and D. Aspinall. On validity of program transformations in the Java memory model. In Proceedings of the European Conference on Object-Oriented Programming, pages 27--51, 2008.
[22]
J. Ševčík, V. Vafeiadis, F. Z. Nardelli, S. Jagannathan, and P. Sewell. CompCertTSO: A verified compiler for relaxed-memory concurrency. JACM, 60, 2013.

Cited By

View all
  • (2024)Automated Robustness Verification of Concurrent Data Structure Libraries against Relaxed Memory ModelsProceedings of the ACM on Programming Languages10.1145/36898028:OOPSLA2(2578-2605)Online publication date: 8-Oct-2024
  • (2023)Putting Weak Memory in Order via a Promising Intermediate RepresentationProceedings of the ACM on Programming Languages10.1145/35912977:PLDI(1872-1895)Online publication date: 6-Jun-2023
  • (2023)An Operational Approach to Library Abstraction under Relaxed Memory ConcurrencyProceedings of the ACM on Programming Languages10.1145/35712467:POPL(1542-1572)Online publication date: 11-Jan-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
MSPC '14: Proceedings of the workshop on Memory Systems Performance and Correctness
June 2014
61 pages
ISBN:9781450329170
DOI:10.1145/2618128
Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author.

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 13 June 2014

Check for updates

Author Tags

  1. C++
  2. Java
  3. atomic operations
  4. relaxed memory models

Qualifiers

  • Research-article

Funding Sources

Conference

PLDI '14
Sponsor:

Acceptance Rates

MSPC '14 Paper Acceptance Rate 6 of 20 submissions, 30%;
Overall Acceptance Rate 6 of 20 submissions, 30%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)188
  • Downloads (Last 6 weeks)33
Reflects downloads up to 10 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Automated Robustness Verification of Concurrent Data Structure Libraries against Relaxed Memory ModelsProceedings of the ACM on Programming Languages10.1145/36898028:OOPSLA2(2578-2605)Online publication date: 8-Oct-2024
  • (2023)Putting Weak Memory in Order via a Promising Intermediate RepresentationProceedings of the ACM on Programming Languages10.1145/35912977:PLDI(1872-1895)Online publication date: 6-Jun-2023
  • (2023)An Operational Approach to Library Abstraction under Relaxed Memory ConcurrencyProceedings of the ACM on Programming Languages10.1145/35712467:POPL(1542-1572)Online publication date: 11-Jan-2023
  • (2022)The leaky semicolon: compositional semantic dependencies for relaxed-memory concurrencyProceedings of the ACM on Programming Languages10.1145/34987166:POPL(1-30)Online publication date: 12-Jan-2022
  • (2022)Quantifiability: a concurrent correctness condition modeled in vector spaceComputing10.1007/s00607-022-01092-3105:5(955-978)Online publication date: 7-Jun-2022
  • (2021)C11Tester: a race detector for C/C++ atomicsProceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3445814.3446711(630-646)Online publication date: 19-Apr-2021
  • (2021)Verifying observational robustness against a c11-style memory modelProceedings of the ACM on Programming Languages10.1145/34342855:POPL(1-33)Online publication date: 4-Jan-2021
  • (2021)A Survey of Programming Language Memory ModelsProgramming and Computer Software10.1134/S036176882106005047:6(439-456)Online publication date: 3-Dec-2021
  • (2021)Let’s Put the Memory Model Front and Center When Teaching Parallel Programming in C++2021 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW)10.1109/IPDPSW52791.2021.00057(315-320)Online publication date: Jun-2021
  • (2020)Pomsets with preconditions: a simple model of relaxed memoryProceedings of the ACM on Programming Languages10.1145/34282624:OOPSLA(1-30)Online publication date: 13-Nov-2020
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media