Safe Optimisations for Shared-Memory Concurrent Programs

被引:1
|
作者
Sevcik, Jaroslav [1 ]
机构
[1] Univ Cambridge, MathWorks, Cambridge CB2 1TN, England
基金
英国工程与自然科学研究理事会;
关键词
Languages; Reliability; Theory; Verification; Relaxed Memory Models; Semantics; Compiler Optimizations;
D O I
10.1145/1993316.1993534
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Current proposals for concurrent shared-memory languages, including C++ and C, provide sequential consistency only for programs without data races (the DRF guarantee). While the implications of such a contract for hardware optimisations are relatively well-understood, the correctness of compiler optimisations under the DRF guarantee is less clear, and experience with Java shows that this area is error-prone. In this paper we give a rigorous study of optimisations that involve both reordering and elimination of memory reads and writes, covering many practically important optimisations. We first define powerful classes of transformations semantically, in a language-independent trace semantics. We prove that any composition of these transformations is sound with respect to the DRF guarantee, and moreover that they provide basic security guarantees (no thin-air reads) even for programs with data races. To give a concrete example, we apply our semantic results to a simple imperative language and prove that several syntactic transformations are safe for that language. We also discuss some surprising limitations of the DRF guarantee.
引用
收藏
页码:306 / 316
页数:11
相关论文
共 50 条
  • [1] Safe Optimisations for Shared-Memory Concurrent Programs
    Sevcik, Jaroslav
    PLDI 11: PROCEEDINGS OF THE 2011 ACM CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION, 2011, : 306 - 316
  • [2] Towards Algorithmic Synthesis of Synchronization for Shared-Memory Concurrent Programs
    Samanta, Roopsha
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2012, (84): : 17 - 32
  • [3] Location pairs: a test coverage metric for shared-memory concurrent programs
    Tasiran, Serdar
    Keremoglu, M. Erkan
    Muslu, Kivanc
    EMPIRICAL SOFTWARE ENGINEERING, 2012, 17 (03) : 129 - 165
  • [4] Location pairs: a test coverage metric for shared-memory concurrent programs
    Serdar Tasiran
    M. Erkan Keremoğlu
    Kivanç Muşlu
    Empirical Software Engineering, 2012, 17 : 129 - 165
  • [5] Slicing Shared-Memory Concurrent Programs The Threaded System Dependence Graph Revisited
    Galindo, Carlos
    Llorens, Marisa
    Perez, Sergio
    Silva, Josep
    2023 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION, ICSME, 2023, : 73 - 83
  • [6] Toward New Unit-Testing Techniques for Shared-Memory Concurrent Programs
    Jongmans, Sung-Shik
    2019 24TH INTERNATIONAL CONFERENCE ON ENGINEERING OF COMPLEX COMPUTER SYSTEMS (ICECCS 2019), 2019, : 164 - 169
  • [7] Event manipulation for nondeterministic shared-memory programs
    Kranzlmüller, D
    Kobler, R
    Volkert, J
    HIGH-PERFORMANCE COMPUTING AND NETWORKING, 2001, 2110 : 283 - 292
  • [8] Quality of Concurrent Shared Memory Programs
    Panchenko, Taras
    Fabunmi, Sunmade
    2018 11TH INTERNATIONAL CONFERENCE ON THE QUALITY OF INFORMATION AND COMMUNICATIONS TECHNOLOGY (QUATIC), 2018, : 299 - 300
  • [9] Adaptive Space-Shared Scheduling for Shared-Memory Parallel Programs
    Cho, Younghyun
    Oh, Surim
    Egger, Bernhard
    JOB SCHEDULING STRATEGIES FOR PARALLEL PROCESSING, JSSPP 2016, 2017, 10353 : 158 - 177
  • [10] A serializability violation detector for shared-memory server programs
    Xu, M
    Bodík, R
    Hill, MD
    ACM SIGPLAN NOTICES, 2005, 40 (06) : 1 - 14