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

Hybrid Static–Dynamic Analysis for Statically Bounded Region Serializability

Published: 14 March 2015 Publication History

Abstract

Data races are common. They are difficult to detect, avoid, or eliminate, and programmers sometimes introduce them intentionally. However, shared-memory programs with data races have unexpected, erroneous behaviors. Intentional and unintentional data races lead to atomicity and sequential consistency (SC) violations, and they make it more difficult to understand, test, and verify software. Existing approaches for providing stronger guarantees for racy executions add high run-time overhead and/or rely on custom hardware. This paper shows how to provide stronger semantics for racy programs while providing relatively good performance on commodity systems. A novel hybrid static--dynamic analysis called \emph{EnfoRSer} provides end-to-end support for a memory model called \emph{statically bounded region serializability} (SBRS) that is not only stronger than weak memory models but is strictly stronger than SC. EnfoRSer uses static compiler analysis to transform regions, and dynamic analysis to detect and resolve conflicts at run time. By demonstrating commodity support for a reasonably strong memory model with reasonable overheads, we show its potential as an always-on execution model.

References

[1]
S. V. Adve and H.-J. Boehm. Memory Models: A Case for Rethinking Parallel Languages and Hardware. CACM, 53:90--101, 2010.
[2]
S. V. Adve and M. D. Hill. Weak Ordering--A New Definition. In ISCA, pages 2--14, 1990.
[3]
S. V. Adve, M. D. Hill, B. P. Miller, and R. H. B. Netzer. Detecting Data Races on Weak Memory Systems. In ISCA, pages 234--243, 1991.
[4]
W. Ahn, S. Qi, M. Nicolaides, J. Torrellas, J.-W. Lee, X. Fang, S. Midkiff, and D. Wong. BulkCompiler: High-performance Sequential Consistency through Cooperative Compiler and Hardware Support. In MICRO, pages 133--144, 2009.
[5]
B. Alpern, S. Augart, S. M. Blackburn, M. Butrico, A. Cocchi, P. Cheng, J. Dolby, S. Fink, D. Grove, M. Hind, K. S. McKinley, M. Mergen, J. E. B. Moss, T. Ngo, and V. Sarkar. The Jikes Research Virtual Machine Project: Building an Open-Source Research Community. IBM Systems Journal, 44:399--417, 2005.
[6]
S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In OOPSLA, pages 169--190, 2006.
[7]
H.-J. Boehm. Position paper: Nondeterminism is Unavoidable, but Data Races are Pure Evil. In RACES, pages 9--14, 2012.
[8]
H.-J. Boehm and S. V. Adve. Foundations of the C
[9]
Concurrency Memory Model. In PLDI, pages 68--78, 2008.
[10]
M. D. Bond, K. E. Coons, and K. S. McKinley. Pacer: Proportional Detection of Data Races. In PLDI, pages 255--268, 2010.
[11]
M. D. Bond, M. Kulkarni, M. Cao, M. Zhang, M. Fathi Salmi, S. Biswas, A. Sengupta, and J. Huang. Octet: Capturing and Controlling Cross-Thread Dependences Efficiently. In OOPSLA, pages 693--712, 2013.
[12]
C. Boyapati, R. Lee, and M. Rinard. Ownership Types for Safe Programming: Preventing Data Races and Deadlocks. In OOPSLA, pages 211--230, 2002.
[13]
S. Burckhardt and M. Musuvathi. Effective Program Verification for Relaxed Memory Models. In CAV, pages 107--120, 2008.
[14]
M. Cao, M. Zhang, and M. D. Bond. Drinking from Both Glasses: Adaptively Combining Pessimistic and Optimistic Synchronization for Efficient Parallel Runtime Support. In WoDet, 2014.
[15]
L. Ceze, J. Devietti, B. Lucia, and S. Qadeer. A Case for System Support for Concurrency Exceptions. In HotPar, 2009.
[16]
J.-D. Choi, K. Lee, A. Loginov, R. O'Callahan, V. Sarkar, and M. Sridharan. Efficient and Precise Datarace Detection for Multithreaded Object-Oriented Programs. In PLDI, pages 258--269, 2002.
[17]
R. Chugh, J. W. Voung, R. Jhala, and S. Lerner. Dataflow Analysis for Concurrent Programs using Datarace Detection. In PLDI, pages 316--326, 2008.
[18]
M. de Kruijf and K. Sankaralingam. Idempotent Code Generation: Implementation, Analysis, and Evaluation. In CGO, pages 1--12, 2013.
[19]
L. Effinger-Dean, B. Lucia, L. Ceze, D. Grossman, and H.-J. Boehm. IFRit: Interference-Free Regions for Dynamic Data-Race Detection. In OOPSLA, pages 467--484, 2012.
[20]
T. Elmas, S. Qadeer, and S. Tasiran. Goldilocks: A Race and Transaction-Aware Java Runtime. In PLDI, pages 245--255, 2007.
[21]
J. Ferrante, K. J. Ottenstein, and J. D. Warren. The Program Dependence Graph and Its Use in Optimization. TOPLAS, 9(3):319--349, 1987.
[22]
C. Flanagan and S. N. Freund. FastTrack: Efficient and Precise Dynamic Race Detection. In PLDI, pages 121--133, 2009.
[23]
C. Flanagan and S. N. Freund. Adversarial Memory For Detecting Destructive Races. In PLDI, pages 244--254, 2010.
[24]
K. Gharachorloo and P. B. Gibbons. Detecting Violations of Sequential Consistency. In SPAA, pages 316--326, 1991.
[25]
L. Hammond, V. Wong, M. Chen, B. D. Carlstrom, J. D. Davis, B. Hertzberg, M. K. Prabhu, H. Wijaya, C. Kozyrakis, and K. Olukotun. Transactional Memory Coherence and Consistency. In ISCA, pages 102--113, 2004.
[26]
T. Harris and K. Fraser. Language Support for Lightweight Transactions. In OOPSLA, pages 388--402, 2003.
[27]
M. Herlihy and J. E. B. Moss. Transactional Memory: Architectural Support for Lock-Free Data Structures. In ISCA, pages 289--300, 1993.
[28]
S. Horwitz, T. Reps, and D. Binkley. Interprocedural Slicing Using Dependence Graphs. In PLDI, pages 35--46, 1988.
[29]
L. Lamport. Time, Clocks, and the Ordering of Events in a Distributed System. CACM, 21(7):558--565, 1978.
[30]
L. Lamport. How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs. IEEE Computer, 28:690--691, 1979.
[31]
C. Lattner and V. Adve. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In CGO, pages 75--88, 2004.
[32]
D. Lee, P. M. Chen, J. Flinn, and S. Narayanasamy. Chimera: Hybrid Program Analysis for Determinism. In PLDI, pages 463--474, 2012.
[33]
D. Lee, B. Wester, K. Veeraraghavan, S. Narayanasamy, P. M. Chen, and J. Flinn. Respec: Efficient Online Multiprocessor Replay via Speculation and External Determinism. In ASPLOS, pages 77--90, 2010.
[34]
C. Lin, V. Nagarajan, and R. Gupta. Efficient Sequential Consistency Using Conditional Fences. In PACT, pages 295--306, 2010.
[35]
C. Lin, V. Nagarajan, R. Gupta, and B. Rajaram. Efficient Sequential Consistency via Conflict Ordering. In ASPLOS, pages 273--286, 2012.
[36]
T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Prentice Hall PTR, 2nd edition, 1999.
[37]
S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from Mistakes: A Comprehensive Study on Real World Concurrency Bug Characteristics. In ASPLOS, pages 329--339, 2008.
[38]
S. Lu, J. Tucek, F. Qin, and Y. Zhou. AVIO: Detecting Atomicity Violations via Access-Interleaving Invariants. In ASPLOS, pages 37--48, 2006.
[39]
B. Lucia, L. Ceze, K. Strauss, S. Qadeer, and H.-J. Boehm. Conflict Exceptions: Simplifying Concurrent Language Semantics with Precise Hardware Exceptions for Data-Races. In ISCA, pages 210--221, 2010.
[40]
B. Lucia, J. Devietti, K. Strauss, and L. Ceze. Atom-Aid: Detecting and Surviving Atomicity Violations. In ISCA, pages 277--288, 2008.
[41]
J. Manson, W. Pugh, and S. V. Adve. The Java Memory Model. In POPL, pages 378--391, 2005.
[42]
D. Marino, A. Singh, T. Millstein, M. Musuvathi, and S. Narayanasamy. DRFx: A Simple and Efficient Memory Model for Concurrent Programming Languages. In PLDI, pages 351--362, 2010.
[43]
D. Marino, A. Singh, T. Millstein, M. Musuvathi, and S. Narayanasamy. A Case for an SC-Preserving Compiler. In PLDI, pages 199--210, 2011.
[44]
M. Musuvathi and S. Qadeer. Iterative Context Bounding for Systematic Testing of Multithreaded Programs. In PLDI, pages 446--455, 2007.
[45]
M. Naik and A. Aiken. Conditional Must Not Aliasing for Static Race Detection. In POPL, pages 327--338, 2007.
[46]
M. Naik, A. Aiken, and J. Whaley. Effective Static Race Detection for Java. In PLDI, pages 308--319, 2006.
[47]
J. Ouyang, P. M. Chen, J. Flinn, and S. Narayanasamy. ...and region serializability for all. In HotPar, 2013.
[48]
S. Park, Y. Zhou, W. Xiong, Z. Yin, R. Kaushik, K. H. Lee, and S. Lu. PRES: Probabilistic Replay with Execution Sketching on Multiprocessors. In SOSP, pages 177--192, 2009.
[49]
P. Ranganathan, V. Pai, and S. Adve. Using Speculative Retirement and Larger Instruction Windows to Narrow the Performance Gap between Memory Consistency Models. In SPAA, page pages, 1997.
[50]
C. G. Ritson and F. R. Barnes. An Evaluation of Intel's Restricted Transactional Memory for CPAs. In CPA, pages 271--292, 2013.
[51]
M. Ronsse and K. De Bosschere. RecPlay: A Fully Integrated Practical Record/Replay System. TOCS, 17:133--152, 1999.
[52]
D. Shasha and M. Snir. Efficient and Correct Execution of Parallel Programs that Share Memory. TOPLAS, 10(2):282--312, 1988.
[53]
A. Singh, D. Marino, S. Narayanasamy, T. Millstein, and M. Musuvathi. Efficient Processor Support for DRFx, a Memory Model with Exceptions. In ASPLOS, pages 53--66, 2011.
[54]
A. Singh, S. Narayanasamy, D. Marino, T. Millstein, and M. Musuvathi. End-to-End Sequential Consistency. In ISCA, pages 524--535, 2012.
[55]
L. A. Smith, J. M. Bull, and J. Obdrzálek. A Parallel Java Grande Benchmark Suite. In SC, pages 8--8, 2001.
[56]
Z. Sura, X. Fang, C.-L. Wong, S. P. Midkiff, J. Lee, and D. Padua. Compiler Techniques for High Performance Sequentially Consistent Java Programs. In PPoPP, pages 2--13, 2005.
[57]
K. Veeraraghavan, D. Lee, B. Wester, J. Ouyang, P. M. Chen, J. Flinn, and S. Narayanasamy. DoublePlay: Parallelizing Sequential Logging and Replay. In ASPLOS, pages 15--26, 2011.
[58]
C. von Praun and T. R. Gross. Static Conflict Analysis for Multi-Threaded Object-Oriented Programs. In PLDI, pages 115--128, 2003.
[59]
J. Ševčík and D. Aspinall. On Validity of Program Transformations in the Java Memory Model. In ECOOP, pages 27--51, 2008.
[60]
R. M. Yoo, C. J. Hughes, K. Lai, and R. Rajwar. Performance Evaluation of Intel Transactional Synchronization Extensions for High-Performance Computing. In SC, pages 19:1--19:11, 2013.
[61]
M. Zhang, J. Huang, M. Cao, and M. D. Bond. LarkTM: Efficient, Strongly Atomic Software Transactional Memory. In PPoPP, 2015. To appear.
[62]
W. Zhang, M. de Kruijf, A. Li, S. Lu, and K. Sankaralingam. ConAir: Featherweight Concurrency Bug Recovery via Single-threaded Idempotent Execution. In ASPLOS, pages 113--126, 2013.

Cited By

View all
  • (2021)ConDySTA: Context-Aware Dynamic Supplement to Static Taint Analysis2021 IEEE Symposium on Security and Privacy (SP)10.1109/SP40001.2021.00040(796-812)Online publication date: May-2021
  • (2020)PeacenikProceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3373376.3378485(317-333)Online publication date: 9-Mar-2020
  • (2019)Accelerating sequential consistency for Java with speculative compilationProceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3314221.3314611(16-30)Online publication date: 8-Jun-2019
  • Show More Cited By

Index Terms

  1. Hybrid Static–Dynamic Analysis for Statically Bounded Region Serializability

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ASPLOS '15: Proceedings of the Twentieth International Conference on Architectural Support for Programming Languages and Operating Systems
    March 2015
    720 pages
    ISBN:9781450328357
    DOI:10.1145/2694344
    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

    In-Cooperation

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 14 March 2015

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. atomicity
    2. dynamic analysis
    3. memory models
    4. region serializability
    5. static analysis
    6. synchronization

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    ASPLOS '15

    Acceptance Rates

    ASPLOS '15 Paper Acceptance Rate 48 of 287 submissions, 17%;
    Overall Acceptance Rate 535 of 2,713 submissions, 20%

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)15
    • Downloads (Last 6 weeks)2
    Reflects downloads up to 25 Dec 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2021)ConDySTA: Context-Aware Dynamic Supplement to Static Taint Analysis2021 IEEE Symposium on Security and Privacy (SP)10.1109/SP40001.2021.00040(796-812)Online publication date: May-2021
    • (2020)PeacenikProceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3373376.3378485(317-333)Online publication date: 9-Mar-2020
    • (2019)Accelerating sequential consistency for Java with speculative compilationProceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3314221.3314611(16-30)Online publication date: 8-Jun-2019
    • (2019)Rethinking Support for Region Conflict Exceptions2019 IEEE International Parallel and Distributed Processing Symposium (IPDPS)10.1109/IPDPS.2019.00116(1095-1106)Online publication date: May-2019
    • (2018)High-coverage, unbounded sound predictive race detectionACM SIGPLAN Notices10.1145/3296979.319238553:4(374-389)Online publication date: 11-Jun-2018
    • (2018)SOFRITASACM SIGPLAN Notices10.1145/3296957.317319253:2(286-300)Online publication date: 19-Mar-2018
    • (2018)High-coverage, unbounded sound predictive race detectionProceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3192366.3192385(374-389)Online publication date: 11-Jun-2018
    • (2018)SOFRITASProceedings of the Twenty-Third International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3173162.3173192(286-300)Online publication date: 19-Mar-2018
    • (2017)Legato: end-to-end bounded region serializability using commodity hardware transactional memoryProceedings of the 2017 International Symposium on Code Generation and Optimization10.5555/3049832.3049834(1-13)Online publication date: 4-Feb-2017
    • (2017)Avoiding consistency exceptions under strong memory modelsACM SIGPLAN Notices10.1145/3156685.309227152:9(115-127)Online publication date: 18-Jun-2017
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media