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 条
  • [11] EXECUTION REPLAY WITH COMPACT LOGS FOR SHARED-MEMORY PROGRAMS
    LEVROUW, LJ
    AUDENAERT, KMR
    VANCAMPENHOUT, JM
    APPLICATIONS IN PARALLEL AND DISTRIBUTED COMPUTING, 1994, 44 : 125 - 134
  • [12] Variables as Resource for Shared-Memory Programs: Semantics and Soundness
    Brookes, Stephen
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2006, 158 : 123 - 150
  • [13] Thread-modular verification for shared-memory programs
    Flanagan, C
    Freund, SN
    Qadeer, S
    PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2002, 2305 : 262 - 277
  • [14] A Fully Concurrent Adaptive Snapshot Object for RMWable Shared-Memory
    Bashari, Benyamin
    Chan, David Yu Cheng
    Woelfel, Philipp
    Leibniz International Proceedings in Informatics, LIPIcs, 319
  • [15] Replay for concurrent non-deterministic shared-memory applications
    Russinovich, M
    Cogswell, B
    ACM SIGPLAN NOTICES, 1996, 31 (05) : 258 - 266
  • [16] A scheduling policy for blocked programs in multiprogrammed shared-memory multiprocessors
    Jung, I
    Hyun, J
    Lee, J
    IEICE TRANSACTIONS ON INFORMATION AND SYSTEMS, 2000, E83D (09): : 1762 - 1771
  • [18] Statically checking confidentiality of shared-memory programs with dynamic labels
    Voelp, Marcus
    ARES 2008: PROCEEDINGS OF THE THIRD INTERNATIONAL CONFERENCE ON AVAILABILITY, SECURITY AND RELIABILITY, 2008, : 268 - +
  • [19] AND-PARALLEL EXECUTION OF LOGIC PROGRAMS ON A SHARED-MEMORY MULTIPROCESSOR
    LIN, YJ
    KUMAR, V
    JOURNAL OF LOGIC PROGRAMMING, 1991, 10 (02): : 155 - 178
  • [20] SYNTHETIC-PERTURBATION TECHNIQUES FOR SCREENING SHARED-MEMORY PROGRAMS
    SNELICK, R
    JAJA, J
    KACKER, R
    LYON, G
    SOFTWARE-PRACTICE & EXPERIENCE, 1994, 24 (08): : 679 - 701