Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3385412.3386010acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article
Open access

Promising 2.0: global optimizations in relaxed memory concurrency

Published: 11 June 2020 Publication History

Abstract

For more than fifteen years, researchers have tried to support global optimizations in a usable semantics for a concurrent programming language, yet this task has been proven to be very difficult because of (1) the infamous “out of thin air” problem, and (2) the subtle interaction between global and thread-local optimizations.
In this paper, we present a solution to this problem by redesigning a key component of the promising semantics (PS) of Kang et al. Our updated PS 2.0 model supports all the results known about the original PS model (i.e., thread-local optimizations, hardware mappings, DRF theorems), but additionally enables transformations based on global value-range analysis as well as register promotion (i.e., making accesses to a shared location local if the location is accessed by only one thread). PS 2.0 also resolves a problem with the compilation of relaxed RMWs to ARMv8, which required an unintended extra fence.

References

[2]
Coq development and supplementary material for this paper. http://sf.snu.ac.kr/promising2.0
[3]
Mark Batty, Mike Dodds, and Alexey Gotsman. 2013. Library abstraction for C/C++ concurrency. In POPL 2013. 235–248. Promising 2.0 PLDI ’20, June 15–20, 2020, London, UK
[4]
Mark Batty, Scott Owens, Susmit Sarkar, Peter Sewell, and Tjark Weber. 2011. Mathematizing C++ Concurrency. In POPL 2011 (Austin, Texas, USA). ACM, New York, NY, USA, 55–66. 1926385.1926394
[5]
John Bender and Jens Palsberg. 2019. A Formalization of Java’s Concurrent Access Modes. Proc. ACM Program. Lang. 3, OOPSLA (2019), 142:1–142:28.
[6]
Hans-Juergen Boehm. 2019. P1217R2: Out-of-thin-air, revisited, again. wg21.link/p1217 [Online; accessed 22-March-2020].
[7]
C/C++11 mappings to processors 2019.
[8]
Retrieved July 3, 2019 from http://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html
[9]
Soham Chakraborty and Viktor Vafeiadis. 2019. Grounding thin-air reads with event structures. Proc. ACM Program. Lang. 3, POPL, Article 70 (Jan. 2019), 28 pages.
[10]
Alan Jeffrey and James Riely. 2016.
[11]
On Thin Air Reads: Towards an Event Structures Model of Relaxed Memory. In LICS 2016. ACM, 759–767.
[12]
Alan Jeffrey and James Riely. 2019.
[13]
On Thin Air Reads: Towards an Event Structures Model of Relaxed Memory. Logical Methods in Computer Science 15, 1 (2019).
[14]
JMM causality test cases 2019.
[15]
Retrieved November 17, 2019 from http://www.cs.umd.edu/~pugh/java/memoryModel/ unifiedProposal/testcases.html
[16]
Jeehoon Kang. 2019.
[17]
Reconciling low-level features of C with compiler optimizations. Ph.D. Dissertation. Seoul National University.
[18]
Jeehoon Kang, Chung-Kil Hur, Ori Lahav, Viktor Vafeiadis, and Derek Dreyer. 2017. A promising semantics for relaxed-memory concurrency. In POPL 2017 (Paris, France). ACM, New York, NY, USA, 175–189.
[19]
Ori Lahav, Viktor Vafeiadis, Jeehoon Kang, Chung-Kil Hur, and Derek Dreyer. 2017. Repairing Sequential Consistency in C/C++11. In PLDI 2017 (Barcelona, Spain). ACM, New York, NY, USA, 618–632.
[20]
Doug Lea. 2019. JEP 188: Java Memory Model Update. Retrieved November 17, 2019 from http://openjdk.java.net/jeps/188
[21]
Doug Lea. 2019.
[22]
Using JDK 9 Memory Order Modes. Retrieved November 17, 2019 from http://gee.cs.oswego.edu/dl/html/j9mm.html
[23]
Jeremy Manson, William Pugh, and Sarita V. Adve. 2005.
[24]
The Java memory model. In POPL 2005. ACM, 378–391. 1040305.1040336
[25]
Evgenii Moiseenko, Anton Podkopaev, Ori Lahav, Orestis Melkonian, and Viktor Vafeiadis. 2019. Reconciling Event Structures with Modern Multiprocessors. arXiv preprint arXiv:1911.06567 (2019).
[26]
Jean Pichon-Pharabod and Peter Sewell. 2016.
[27]
A Concurrency Semantics for Relaxed Atomics That Permits Optimisation and Avoids Thin-air Executions. In POPL 2016 (St. Petersburg, FL, USA). ACM, 622–633.
[28]
Anton Podkopaev, Ori Lahav, and Viktor Vafeiadis. 2019. Bridging the Gap Between Programming Languages and Hardware Weak Memory Models. Proc. ACM Program. Lang. 3, POPL, Article 69 (Jan. 2019), 31 pages.
[29]
Christopher Pulte, Shaked Flur, Will Deacon, Jon French, Susmit Sarkar, and Peter Sewell. 2018.
[30]
Simplifying ARM concurrency: Multicopyatomic axiomatic and operational models for ARMv8. Proc. ACM Program. Lang. 2, POPL (2018), 19:1–19:29. 3158107
[31]
Jaroslav Sevcik and David Aspinall. 2008.
[32]
On Validity of Program Transformations in the Java Memory Model. In ECOOP. 27–51.
[33]
Viktor Vafeiadis, Thibaut Balabonski, Soham Chakraborty, Robin Morisset, and Francesco Zappa Nardelli. 2015.
[34]
Common Compiler Optimisations Are Invalid in the C11 Memory Model and What We Can Do About It. In POPL 2015 (Mumbai, India). ACM, New York, NY, USA, 209–220.
[35]
Viktor Vafeiadis and Chinmay Narayan. 2013.
[36]
Relaxed Separation Logic: A program logic for C11 concurrency. In OOPSLA 2013. ACM, New York, NY, USA, 867–884.

Cited By

View all
  • (2024)Semantics of Remote Direct Memory Access: Operational and Declarative Models of RDMA on TSO ArchitecturesProceedings of the ACM on Programming Languages10.1145/36897818:OOPSLA2(1982-2009)Online publication date: 8-Oct-2024
  • (2024)A Two-Phase Infinite/Finite Low-Level Memory Model: Reconciling Integer–Pointer Casts, Finite Space, and undef at the LLVM IR Level of AbstractionProceedings of the ACM on Programming Languages10.1145/36746528:ICFP(789-817)Online publication date: 15-Aug-2024
  • (2024)Fully Composable and Adequate Verified Compilation with Direct Refinements between Open ModulesProceedings of the ACM on Programming Languages10.1145/36329148:POPL(2160-2190)Online publication date: 5-Jan-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI 2020: Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2020
1174 pages
ISBN:9781450376136
DOI:10.1145/3385412
Permission to make digital or hard copies of all or part 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 components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 June 2020

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. Compiler Optimizations
  2. Operational Semantics
  3. Relaxed Memory Concurrency

Qualifiers

  • Research-article

Conference

PLDI '20
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)217
  • Downloads (Last 6 weeks)23
Reflects downloads up to 24 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Semantics of Remote Direct Memory Access: Operational and Declarative Models of RDMA on TSO ArchitecturesProceedings of the ACM on Programming Languages10.1145/36897818:OOPSLA2(1982-2009)Online publication date: 8-Oct-2024
  • (2024)A Two-Phase Infinite/Finite Low-Level Memory Model: Reconciling Integer–Pointer Casts, Finite Space, and undef at the LLVM IR Level of AbstractionProceedings of the ACM on Programming Languages10.1145/36746528:ICFP(789-817)Online publication date: 15-Aug-2024
  • (2024)Fully Composable and Adequate Verified Compilation with Direct Refinements between Open ModulesProceedings of the ACM on Programming Languages10.1145/36329148:POPL(2160-2190)Online publication date: 5-Jan-2024
  • (2024)An Axiomatic Basis for Computer Programming on the Relaxed Arm-A Architecture: The AxSL LogicProceedings of the ACM on Programming Languages10.1145/36328638:POPL(604-637)Online publication date: 5-Jan-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)Fair Operational SemanticsProceedings of the ACM on Programming Languages10.1145/35912537:PLDI(811-834)Online publication date: 6-Jun-2023
  • (2023)Optimal Reads-From Consistency Checking for C11-Style Memory ModelsProceedings of the ACM on Programming Languages10.1145/35912517:PLDI(761-785)Online publication date: 6-Jun-2023
  • (2023)Mechanised Operational Reasoning for C11 Programs with Relaxed DependenciesFormal Aspects of Computing10.1145/358028535:2(1-27)Online publication date: 13-Jan-2023
  • (2023)Choice Trees: Representing Nondeterministic, Recursive, and Impure Programs in CoqProceedings of the ACM on Programming Languages10.1145/35712547:POPL(1770-1800)Online publication date: 11-Jan-2023
  • (2023)Risotto: A Dynamic Binary Translator for Weak Memory Model ArchitecturesProceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 110.1145/3567955.3567962(107-122)Online publication date: 25-Mar-2023
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media