Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Dynamic enforcement of determinism in a parallel scripting language

Published: 09 June 2014 Publication History
  • Get Citation Alerts
  • Abstract

    Determinism is an appealing property for parallel programs, as it simplifies understanding, reasoning and debugging. It is particularly appealing in dynamic (scripting) languages, where ease of programming is a dominant design goal. Some existing parallel languages use the type system to enforce determinism statically, but this is not generally practical for dynamic languages. In this paper, we describe how determinism can be obtained---and dynamically enforced/verified---for appropriate extensions to a parallel scripting language. Specifically, we introduce the constructs of Deterministic Parallel Ruby (DPR), together with a run-time system (Tardis) that verifies properties required for determinism, including correct usage of reductions and commutative operators, and the mutual independence (data-race freedom) of concurrent tasks. Experimental results confirm that DPR can provide scalable performance on multicore machines and that the overhead of Tardis is low enough for practical testing. In particular, Tardis significantly outperforms alternative data-race detectors with comparable functionality. We conclude with a discussion of future directions in the dynamic enforcement of determinism.

    References

    [1]
    C. Bienia, S. Kumar, J. P. Singh, and K. Li. The PARSEC benchmark suite: Characterization and architectural implications. In Intl. Conf. on Parallel Architectures and Compilation Techniques (PACT), Toronto, ON, Canada, Oct. 2008.
    [2]
    R. D. Blumofe, C. F. Joerg, B. C. Kuszmaul, C. E. Leiserson, K. H. Randall, and Y. Zhou. Cilk: An efficient multithreaded runtime system. J. of Parallel and Distributed Computing, 37(1):55--69, 1996.
    [3]
    R. Bocchino Jr., V. S. Adve, S. V. Adve, and M. Snir. Parallel programming must be deterministic by default. In First Usenix Workshop on Hot Topics in Parallelism, Berkeley, CA, Mar. 2009.
    [4]
    R. L. Bocchino Jr., V. S. Adve, D. Dig, S. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A type and effect system for deterministic parallel Java. In Object-Oriented Programming Systems, Langauges, and Applications (OOPSLA), Orlando, FL, Oct. 2009.
    [5]
    C.-I. Cheng, M. Feng, C. E. Leiserson, K. H. Randall, and A. F. Stark. Detecting data races in Cilk programs that use locks. In Symp. on Parallel Algorithms and Architectures (SPAA), Puerto Vallarta, Mexico, June--July 1998.
    [6]
    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 SIGPLAN Conf. on Programming Language Design and Implementation (PLDI), Berlin, Germany, June 2002.
    [7]
    J. Devietti, B. P. Wood, K. Strauss, L. Ceze, D. Grossman, and S. Qadeer. RADISH: Always-on sound and complete race detection in software and hardware. In Intl. Symp. on Computer Architecture (ISCA), Portland, OR, June 2012.
    [8]
    C. Ding, B. Gernhart, P. Li, and M. Hertz. Safe parallel programming in an interpreted language. Technical Report #991, Computer Science Dept., Univ. of Rochester, Apr. 2014.
    [9]
    R. A. Dwyer. A faster divide and conquer algorithm for constructing Delaunay triangulation. Algorithmica, 2, 1987.
    [10]
    L. Effinger-Dean, B. Lucia, L. Ceze, D. Grossman, and H.-J. Boehm. IFRit: Interference-free regions for dynamic data-race detection. In Object-Oriented Programming Systems, Langauges, and Applications (OOPSLA), Tucson, AZ, Oct. 2012.
    [11]
    M. Feng and C. E. Leiserson. Efficient detection of determinacy races in Cilk programs. In Symp. on Parallel Algorithms and Architectures (SPAA), Newport, RI, June 1997.
    [12]
    C. Flanagan and S. N. Freund. FastTrack: Efficient and precise dynamic race detection. In SIGPLAN Conf. on Programming Language Design and Implementation (PLDI), Dublin, Ireland, June 2009.
    [13]
    S. Herhut, R. L. Hudson, T. Shpeisman, and J. Sreeram. River Trail: A path to parallelism in JavaScript. In Object-Oriented Programming Systems, Langauges, and Applications (OOPSLA), Indianapolis, IN, Oct. 2013.
    [14]
    M. Herlihy and E. Koskinen. Transactional boosting: A methodology for highly-concurrent transactional objects. In ACM Symp. on Principles and Practice of Parallel Programming (PPoPP), Salt Lake City, UT, Feb. 2008.
    [15]
    S. T. Heumann, V. S. Adve, and S. Wang. The tasks with effects model for safe concurrency. In ACM Symp. on Principles and Practice of Parallel Programming (PPoPP), Shenzhen, China, Feb. 2013.
    [16]
    W. Ji, L. Lu, and M. L. Scott. TARDIS: Task-level access race detection by intersecting sets. In Workshop on Determinism and Correctness in Parallel Programming (WoDet), Houston, TX, Mar. 2013.
    [17]
    JRuby: The Ruby programming language on the JVM. jruby.org/.
    [18]
    B. Kasikci, C. Zamfir, and G. Candea. RaceMob: Crowdsourced data race detection. In ACM Symp. on Operating Systems Principles (SOSP), Farminton, PA, Nov. 2013.
    [19]
    D. Kim and M. C. Rinard. Verification of semantic commutativity conditions and inverse operations on linked data structures. In 32nd SIGPLAN Conf. on Programming Language Design and Implementation (PLDI), San Jose, CA, June 2011.
    [20]
    M. Kulkarni, D. Nguyen, D. Prountzos, X. Sui, and K. Pingali. Exploiting the commutativity lattice. In 32nd SIGPLAN Conf. on Programming Language Design and Implementation (PLDI), San Jose, CA, June 2011.
    [21]
    M. Kulkarni, K. Pingali, B. Walter, G. Ramanarayanan, K. Bala, and L. P. Chew. Optimistic parallelism requires abstractions. In SIGPLAN Conf. on Programming Language Design and Implementation (PLDI), San Diego, CA, June 2007.
    [22]
    L. Lu and M. L. Scott. Toward a formal semantic framework for deterministic parallel programming. In Intl. Symp. on Distributed Computing (DISC), Rome, Italy, Sept. 2011.
    [23]
    J. Mellor-Crummey. On-the-fly detection of data races for programs with nested fork-join parallelism. In Supercomputing Conf., Albuquerque, NM, Nov. 1991.
    [24]
    A. Muzahid, D. S. Gracia, S. Qi, and J. Torrellas. SigRace: Signature-based data race detection. In Intl. Symp. on Computer Architecture (ISCA), Austin, TX, June 2009.
    [25]
    A. Nistor, D. Marinov, and J. Torrellas. Light64: Lightweight hardware support for data race detection during systematic testing of parallel programs. In Intl. Symp. on Microarchitecture (MICRO), New York, NY, Dec. 2009.
    [26]
    R. O'Callahan and J.-D. Choi. Hybrid dynamic data race detection. In ACM Symp. on Principles and Practice of Parallel Programming (PPoPP), San Diego, CA, June 2003.
    [27]
    R. Raman, J. Zhao, V. Sarkar, M. T. Vechev, and E. Yahav. Scalable and precise dynamic datarace detection for structured parallelism. In SIGPLAN Conf. on Programming Language Design and Implementation (PLDI), Beijing, China, June 2012.
    [28]
    M. C. Rinard and P. C. Diniz. Commutativity analysis: A new analysis technique for parallelizing compilers. ACM Trans. on Programming Languages and Systems, 19(6):942--991, Nov. 1997.
    [29]
    M. Ronsse and K. De Bosschere. JiTI: Tracing memory references for data race detection. In Intl. Parallel Computing Conf. (PARCO), Bonn, Germany, Sept. 1997.
    [30]
    M. Ronsse, B. Stougie, J. Maebe, F. Cornelis, and K. D. Bosschere. An efficient data race detector backend for DIOTA. In Intl. Parallel Computing Conf. (PARCO), Dresden, Germany, 2003.
    [31]
    S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. E. Anderson. Eraser: A dynamic data race detector for multithreaded programs. ACM Trans. on Computer Systems, 15(4):391--411, Nov. 1997.
    [32]
    E. Schonberg. On-the-fly detection of access anomalies. In SIGPLAN Conf. on Programming Language Design and Implementation (PLDI), Portland, OR, June 1989. Retrospective appears in ACM SIGPLAN Notices 39:4 (Apr. 2004), pp. 313--314.
    [33]
    J. Shun, G. E. Blelloch, J. T. Fineman, P. B. Gibbons, A. Kyrola, H. V. Simhadri, and K. Tangwongsan. Brief announcement: The problem based benchmark suite. In ACM Symp. on Parallelism in Algorithms and Architectures (SPAA), Pittsburgh, PA, June 2012.
    [34]
    L. A. Smith, J. M. Bull, and J. Obdrzálek. A parallel Java Grande benchmark suite. In Supercomputing Conf., Denver, CO, Nov. 2001.
    [35]
    E. Westbrook, R. Raman, J. Zhao, Z. Budimlić, and V. Sarkar. Dynamic determinism checking for structured parallelism. In Workshop on Determinism and Correctness in Parallel Programming (WoDet), Salt Lake City, UT, Mar. 2014.
    [36]
    X. Xie and J. Xue. Acculock: Accurate and efficient detection of data races. In Intl. Symp. on Code Generation and Optimization (CGO), Seattle, WA, Mar. 2011.
    [37]
    Y. Yu, T. Rodeheffer, and W. Chen. RaceTrack: Efficient detection of data race conditions via adaptive tracking. In ACM Symp. on Operating Systems Principles (SOSP), Brighton, United Kingdom, Oct. 2005.
    [38]
    P. Zhou, R. Teodorescu, and Y. Zhou. HARD: Hardware-assisted lockset-based race detection. In Intl. Symp. on High Performance Computer Architecture (HPCA), Phoenix, AZ, Feb. 2007.

    Cited By

    View all
    • (2019)Model-checking task-parallel programs for data-raceInnovations in Systems and Software Engineering10.1007/s11334-019-00343-5Online publication date: 18-May-2019
    • (2019)Optimized Sound and Complete Data Race Detection in Structured Parallel ProgramsLanguages and Compilers for Parallel Computing10.1007/978-3-030-34627-0_8(94-111)Online publication date: 13-Nov-2019
    • (2017)A Generalized Framework for Automatic Scripting Language Parallelization2017 26th International Conference on Parallel Architectures and Compilation Techniques (PACT)10.1109/PACT.2017.28(356-369)Online publication date: Sep-2017
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 49, Issue 6
    PLDI '14
    June 2014
    598 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2666356
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
    • cover image ACM Conferences
      PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation
      June 2014
      619 pages
      ISBN:9781450327848
      DOI:10.1145/2594291
    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 ACM 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]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 09 June 2014
    Published in SIGPLAN Volume 49, Issue 6

    Check for updates

    Author Tags

    1. data races
    2. determinism
    3. deterministic parallelism
    4. scripting language

    Qualifiers

    • Research-article

    Funding Sources

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)5
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 10 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2019)Model-checking task-parallel programs for data-raceInnovations in Systems and Software Engineering10.1007/s11334-019-00343-5Online publication date: 18-May-2019
    • (2019)Optimized Sound and Complete Data Race Detection in Structured Parallel ProgramsLanguages and Compilers for Parallel Computing10.1007/978-3-030-34627-0_8(94-111)Online publication date: 13-Nov-2019
    • (2017)A Generalized Framework for Automatic Scripting Language Parallelization2017 26th International Conference on Parallel Architectures and Compilation Techniques (PACT)10.1109/PACT.2017.28(356-369)Online publication date: Sep-2017
    • (2017)10 Years of research on debugging concurrent and multicore softwareSoftware Quality Journal10.1007/s11219-015-9301-725:1(49-82)Online publication date: 1-Mar-2017
    • (2016)Parallel data race detection for task parallel programs with locksProceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering10.1145/2950290.2950329(833-845)Online publication date: 1-Nov-2016
    • (2016)Provably Good and Practically Efficient Parallel Race Detection for Fork-Join ProgramsProceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/2935764.2935801(83-94)Online publication date: 11-Jul-2016
    • (2016)Atomicity violation checker for task parallel programsProceedings of the 2016 International Symposium on Code Generation and Optimization10.1145/2854038.2854063(239-249)Online publication date: 29-Feb-2016
    • (2016)Embedding Concurrent Generators2016 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW)10.1109/IPDPSW.2016.8(366-375)Online publication date: May-2016
    • (2015)Concurrent software testing in practice: a catalog of toolsProceedings of the 6th International Workshop on Automating Test Case Design, Selection and Evaluation10.1145/2804322.2804328(31-40)Online publication date: 30-Aug-2015
    • (2019)Proactive work stealing for futuresProceedings of the 24th Symposium on Principles and Practice of Parallel Programming10.1145/3293883.3295735(257-271)Online publication date: 16-Feb-2019
    • Show More Cited By

    View Options

    Get Access

    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