skip to main content
research-article

Dynamic enforcement of determinism in a parallel scripting language

Published:09 June 2014Publication History
Skip Abstract Section

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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  9. R. A. Dwyer. A faster divide and conquer algorithm for constructing Delaunay triangulation. Algorithmica, 2, 1987.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  17. JRuby: The Ruby programming language on the JVM. jruby.org/.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. L. A. Smith, J. M. Bull, and J. Obdrzálek. A parallel Java Grande benchmark suite. In Supercomputing Conf., Denver, CO, Nov. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Dynamic enforcement of determinism in a parallel scripting language

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            • 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

              Copyright © 2014 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 9 June 2014

              Check for updates

              Qualifiers

              • research-article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!