ABSTRACT
Today's shared-memory parallel programming models are complex and error-prone.While many parallel programs are intended to be deterministic, unanticipated thread interleavings can lead to subtle bugs and nondeterministic semantics. In this paper, we demonstrate that a practical type and effect system can simplify parallel programming by guaranteeing deterministic semantics with modular, compile-time type checking even in a rich, concurrent object-oriented language such as Java. We describe an object-oriented type and effect system that provides several new capabilities over previous systems for expressing deterministic parallel algorithms.We also describe a language called Deterministic Parallel Java (DPJ) that incorporates the new type system features, and we show that a core subset of DPJ is sound. We describe an experimental validation showing thatDPJ can express a wide range of realistic parallel programs; that the new type system features are useful for such programs; and that the parallel programs exhibit good performance gains (coming close to or beating equivalent, nondeterministic multithreaded programs where those are available).
References
- http://dpj.cs.uiuc.edu.Google Scholar
- http://gee.cs.oswego.edu/dl/concurrency-interest.Google Scholar
- M. Abadi, C. Flanagan, and S. N. Freund. Types for safe locking: Static race detection for Java. TOPLAS, 2006. Google Scholar
Digital Library
- F. Aleen and N. Clark. Commutativity analysis for software parallelization: letting program transformations see the big picture. ASPLOS, 2009. Google Scholar
Digital Library
- M. D. Allen, S. Sridharan, and G. S. Sohi. Serialization sets: A dynamic dependence-based parallel execution model. PPOPP, 2009. Google Scholar
Digital Library
- Z. Anderson, D. Gay, R. Ennals, and E. Brewer. SharC: Checking data sharing strategies for multithreaded C. PLDI, 2008. Google Scholar
Digital Library
- E. D. Berger, T. Yang, T. Liu, and G. Novark. Grace: Safe Multithreaded Programming for C/C++. OOPSLA, 2009. Google Scholar
Digital Library
- R. D. Blumofe, C. F. Joerg, B. C. Kuszmaul, C. E. Leiserson, K. H. Randall, and Y. Zhou. Cilk: An efficient multithreaded runtime system. PPOPP, 1995. Google Scholar
Digital Library
- R. Bocchino, V. Adve, S. Adve, and M. Snir. Parallel programming must be deterministic by default. First USENIX Workshop on Hot Topics in Parallelism (HotPar), 2009. Google Scholar
Digital Library
- R. L. Bocchino and V. S. Adve. Formal definition and proof of soundness for Core DPJ. Technical Report UIUCDCS-R-2008-2980, U. Illinois, 2008.Google Scholar
- C. Boyapati, R. Lee, and M. Rinard. Ownership types for safe programming: Preventing data races and deadlocks. OOPSLA, 2002. Google Scholar
Digital Library
- J. Boyland. The interdependence of effects and uniqueness. Workshop on Formal Techs. for Java Programs, 2001.Google Scholar
- J. Boyland. Checking interference with fractional permissions. SAS, 2003. Google Scholar
Digital Library
- N. R. Cameron, S. Drossopoulou, J. Noble, and M. J. Smith. Multiple ownership. OOPSLA, 2007. Google Scholar
Digital Library
- P. Charles, C. Grothoff, V. Saraswat, C. Donawa, A. Kielstra, K. Ebcioglu, C. von Praun, and V. Sarkar. X10: An object-oriented approach to non-uniform cluster computing. OOPSLA, 2005. Google Scholar
Digital Library
- D. Clarke and S. Drossopoulou. Ownership, encapsulation and the disjointness of type and effect. OOPSLA, 2002. Google Scholar
Digital Library
- D. Clarke and T. Wrigstad. External uniqueness is unique enough. ECOOP, 2003.Google Scholar
Cross Ref
- D. G. Clarke, J. M. Potter, and J. Noble. Ownership types for flexible alias protection. OOPSLA, 1998. Google Scholar
Digital Library
- J. Dennis. Keynote address. PPOPP, 2009.Google Scholar
- J. DeSouza and L. V. Kalé. MSA: Multiphase specifically shared arrays. LCPC, 2004. Google Scholar
Digital Library
- J. Devietti, B. Lucia, L. Ceze, and M. Oskin. DMP: Deterministic Shared Memory Multiprocessing. ASPLOS, 2009. Google Scholar
Digital Library
- M. Feng and C. E. Leiserson. Efficient detection of determinacy races in Cilk programs. SPAA, 1997. Google Scholar
Digital Library
- C. Flanagan and M. Felleisen. The semantics of future and its use in program optimization. POPL, 1995. Google Scholar
Digital Library
- R. Ghiya, D. Lavery, and D. Sehr. On the importance of points-to analysis and other memory disambiguation methods for C programs. PLDI, 2001. Google Scholar
Digital Library
- A. Gotsman, J. Berdine, B. Cook, and M. Sagiv. Thread-modular shape analysis. PLDI, 2007. Google Scholar
Digital Library
- A. Greenhouse and J. Boyland. An object-oriented effects system. ECOOP, 1999. Google Scholar
Digital Library
- R. T. Hammel and D. K. Gifford. FX-87 performance measurements: Dataflow implementation. Technical Report MIT/LCS/TR-421, 1988.Google Scholar
Digital Library
- B. Jacobs, F. Piessens, J. Smans, K. R. M. Leino, and W. Schulte. A programming model for concurrent object-oriented programs. TOPLAS, 2008. Google Scholar
Digital Library
- M. Kulkarni, K. Pingali, B. Walter, G. Ramanarayanan, K. Bala, and L. P. Chew. Optimistic parallelism requires abstractions. PLDI, 2007. Google Scholar
Digital Library
- K. R. M. Leino, A. Poetzsch-Heffter, and Y. Zhou. Using data groups to specify and check side effects. PLDI, 2002. Google Scholar
Digital Library
- W. Liu, J. Tuck, L. Ceze, W. Ahn, K. Strauss, J. Renau, and J. Torrellas. POSH: a TLS compiler that exploits program structure. PPOPP, 2006. Google Scholar
Digital Library
- Y. Lu and J. Potter. Protecting representation with effect encapsulation. POPL, 2006. Google Scholar
Digital Library
- J. M. Lucassen and D. K. Gifford. Polymorphic effect systems. POPL, 1988. Google Scholar
Digital Library
- C. C. Minh, J. Chung, C. Kozyrakis, and K. Olukotun. STAMP: Stanford transactional applications for multi-processing. IISWC, 2008.Google Scholar
- P. W. O'Hearn. Resources, concurrency, and local reasoning. Theor. Comp. Sci., 2007. Google Scholar
Digital Library
- M. Olszewski, J. Ansel, and S. Amarasinghe. Kendo: Efficient Deterministic Multithreading in Software. ASPLOS, 2009. Google Scholar
Digital Library
- M. J. Parkinson and G. M. Bierman. Separation logic, abstraction and inheritance. POPL, 2008. Google Scholar
Digital Library
- M. K. Prabhu and K. Olukotun. Using thread-level speculation to simplify manual parallelization. PPOPP, 2003. Google Scholar
Digital Library
- M. Raza, C. Calcagno, and P. Gardner. Automatic parallelization with separation logic. ESOP, 2009. Google Scholar
Digital Library
- J. C. Reynolds. Separation logic: A logic for shared mutable data structures. Symp. on Logic in Comp. Sci., 2002. Google Scholar
Digital Library
- M. C. Rinard. The design, implementation and evaluation of Jade: a portable, implicitly parallel programming language. PhD thesis, Stanford University, 1994. Google Scholar
Digital Library
- M. C. Rinard and P. C. Diniz. Commutativity analysis: A new analysis technique for parallelizing compilers. TOPLAS, 1997. Google Scholar
Digital Library
- M. C. Rinard and M. S. Lam. The design, implementation, and evaluation of Jade. TOPLAS, 1998. Google Scholar
Digital Library
- C. Sadowski, S. N. Freund, and C. Flanagan. SingleTrack: A dynamic determinism checker for multithreaded programs. ESOP, 2009. Google Scholar
Digital Library
- J. P. Singh, W.-D. Weber, and A. Gupta. SPLASH: Stanford parallel applications for shared--memory. Technical report, Stanford University, 1992.Google Scholar
- M. Smith. Towards an effects system for ownership domains. ECOOP, 2005.Google Scholar
- M. Snir. Parallel Programming Language 1 (PPL1), V0.9 - Draft. Technical Report UIUCDCS-R-2006-2969, U. Illinois, 2006.Google Scholar
- T. Terauchi and A. Aiken. A capability calculus for concurrency and determinism. TOPLAS, 2008. Google Scholar
Digital Library
- M. Vakilian, D. Dig, R. Bocchino, J. Overbey, V. Adve, and R. Johnson. Inferring Method Effect Summaries for Nested Heap Regions. ASE, 2009. To appear. Google Scholar
Digital Library
- C. von Praun, L. Ceze, and C. Caşcaval. Implicit parallelism with ordered transactions. PPOPP, 2007. Google Scholar
Digital Library
- A. Welc, S. Jagannathan, and A. Hosking. Safe futures for Java. OOPSLA, 2005. Google Scholar
Digital Library
- K. Zee, V. Kuncak, and M. Rinard. Full functional verification of linked data structures. PLDI, 2008. Google Scholar
Digital Library
Index Terms
A type and effect system for deterministic parallel Java






Comments