skip to main content
10.1145/1926385.1926447acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Safe nondeterminism in a deterministic-by-default parallel language

Published:26 January 2011Publication History

ABSTRACT

A number of deterministic parallel programming models with strong safety guarantees are emerging, but similar support for nondeterministic algorithms, such as branch and bound search, remains an open question. We present a language together with a type and effect system that supports nondeterministic computations with a deterministic-by-default guarantee: nondeterminism must be explicitly requested via special parallel constructs (marked nd), and any deterministic construct that does not execute any nd construct has deterministic input-output behavior. Moreover, deterministic parallel constructs are always equivalent to a sequential composition of their constituent tasks, even if they enclose, or are enclosed by, nd constructs. Finally, in the execution of nd constructs, interference may occur only between pairs of accesses guarded by atomic statements, so there are no data races, either between atomic statements and unguarded accesses (strong isolation) or between pairs of unguarded accesses (stronger than strong isolation alone). We enforce the guarantees at compile time with modular checking using novel extensions to a previously described effect system. Our effect system extensions also enable the compiler to remove unnecessary transactional synchronization. We provide a static semantics, dynamic semantics, and a complete proof of soundness for the language, both with and without the barrier removal feature. An experimental evaluation shows that our language can achieve good scalability for realistic parallel algorithms, and that the barrier removal techniques provide significant performance gains.

Skip Supplemental Material Section

Supplemental Material

49-mpeg-4.mp4

mp4

230.9 MB

References

  1. http://iss.ices.utexas.edu/lonestar/.Google ScholarGoogle Scholar
  2. http://gee.cs.oswego.edu/dl/concurrency-interest.Google ScholarGoogle Scholar
  3. http://http://sites.google.com/site/deucestm.Google ScholarGoogle Scholar
  4. OpenMP Application Program Interface, Version 3.0. http://www.openmp.org/mp-documents/spec30.pdf, 2008.Google ScholarGoogle Scholar
  5. M. Abadi et al. Types for safe locking: Static race detection for Java. TOPLAS, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Abadi et al. Semantics of transactional memory and automatic mutual exclusion. In POPL, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Abadi et al. Transactional memory with strong atomicity using off-the-shelf memory protection hardware. In PPoPP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A.-R. Adl-Tabatabai et al. Compiler and runtime support for efficient software transactional memory. In PLDI, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Y. Afek et al. Lowering STM overhead with static analysis. In LCPC, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. D. Allen et al. Serialization sets: A dynamic dependence-based parallel execution model. In PPOPP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A. Aviram et al. Efficient system-enforced deterministic parallelism. 2010.Google ScholarGoogle Scholar
  12. N. E. Beckman et al. Verifying correct usage of atomic blocks and typestate. In OOPSLA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. N. E. Beckman et al. Reducing STM overhead with access permissions. In IWACO, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. T. Bergan et al. CoreDet: A compiler and runtime system for deterministic multithreaded execution. In Int'l. Conf. on Arch. Support for Programming Langs. and Operating Systs. (ASPLOS), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. E. D. Berger et al. Grace: Safe Multithreaded Programming for C/C. In OOPSLA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. R. D. Blumofe et al. Cilk: An efficient multithreaded runtime system. PPOPP, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. R. L. Bocchino et al. A type and effect system for Deterministic Parallel Java. In OOPSLA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. R. L. Bocchino et al. Parallel programming must be deterministic by default. In HotPar, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. L. Bocchino Jr. An Effect System and Language for Deterministic-by-Default Parallel Programming. PhD thesis, University of Illinois, Urbana-Champaign, IL, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. C. Boyapati et al. Ownership types for safe programming: Preventing data races and deadlocks. In OOPSLA, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. Boyland. Checking interference with fractional permissions. SAS, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. N. G. Bronson et al. Feedback-directed barrier optimization in a strongly isolated STM. In POPL, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Z. Budimlic et al. Multi-core implementations of the concurrent collections programming model. In CPC, 2009.Google ScholarGoogle Scholar
  24. S. Burckhardt et al. Concurrent programming with revisions and isolation types. In OOPSLA, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. J. Carey et al. A status report on the OO7 OODBMS benchmarking effort. In OOPSLA, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. L. P. Chew. Guaranteed-quality mesh generation for curved surfaces. In SCG, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Devietti et al. DMP: Deterministic Shared Memory Multiprocessing. In ASPLOS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. D. Dice et al. Transactional locking II. In DISC, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. C. Flanagan et al. Types for atomicity: Static checking and inference for Java. TOPLAS, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. A. Ghuloum et al. Ct: A flexible parallel programming model for tera-scale architectures. Intel White Paper, 2007.Google ScholarGoogle Scholar
  31. T. Harris et al. Composable memory transactions. In PPoPP, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. T. Harris et al. Optimizing memory transactions. In PLDI, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. T. Harris and K. Fraser. Language support for lightweight transactions. In OOPSLA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. B. Jacobs et al. A programming model for concurrent object-oriented programs. TOPLAS, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. A. Kulkarni et al. Task types for pervasive atomicity. In OOPSLA, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. M. Kulkarni et al. Optimistic parallelism requires abstractions. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. J. Larus and R. Rajwar. Transactional Memory (Synthesis Lectures on Computer Architecture). Morgan & Claypool Publishers, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. E. A. Lee. The problem with threads. Computer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. R. Lublinerman et al. Parallel programming with object assemblies. In OOPSLA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. M. Martin, C. Blundell, and E. Lewis. Subtleties of transactional memory atomicity semantics. IEEE Comp. Arch. Letters, 5(2):17, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. N. D. Matsakis and T. R. Gross. A time-aware type system for data-race protection and guaranteed initialization. In OOPSLA, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. K. F. Moore and D. Grossman. High-level small-step operational semantics for transactions. In POPL, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. M. Olszewski et al. Kendo: Efficient deterministic multithreading in software. In ASPLOS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. C. Papadimitriou. The theory of database concurrency control. Computer Science Press, Inc., 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. M. C. Rinard and M. S. Lam. The design, implementation, and evaluation of Jade. TOPLAS, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. F. T. Schneider, V. Menon, T. Shpeisman, and A.-R. Adl-Tabatabai. Dynamic optimization for efficient strong atomicity. In OOPSLA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. T. Shpeisman et al. Enforcing isolation and ordering in STM. In PLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. M. Vakilian et al. Inferring Method Effect Summaries for Deterministic Parallel Java. Technical Report UIUCDCS-R-2009-3038, U. Illinois, 2009.Google ScholarGoogle Scholar
  49. C. von Praun et al. Implicit parallelism with ordered transactions. In PPOPP, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. A. Welc et al. Safe futures for Java. In OOPSLA, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. A. Welc et al. Revocation techniques for Java concurrency. Concurrency and Computation: Practice and Experience, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. R. M. Yoo et al. Kicking the tires of software transactional memory: Why the going gets tough. In SPAA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Safe nondeterminism in a deterministic-by-default parallel 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

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader