Abstract
Type systems that prevent data races are a powerful tool for parallel programming, eliminating whole classes of bugs that are both hard to find and hard to fix. Unfortunately, it is difficult to apply previous such type systems to “real” programs, as each of them are designed around a specific synchronization primitive or parallel pattern, such as locks or disjoint heaps; real programs often have to combine multiple synchronization primitives and parallel patterns. In this work, we present a new permissions-based type system, which we demonstrate is practical by showing that it supports multiple patterns (e.g., task parallelism, object isolation, array-based parallelism), and by applying it to a suite of non-trivial parallel programs. Our system also has a number of theoretical advances over previous work on permissions-based type systems, including aliased write permissions and a simpler way to store permissions in objects than previous approaches.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abadi, M., Flanagan, C., Freund, S.N.: Types for safe locking: Static race detection for java. ACM Trans. Program. Lang. Syst. 28, 207–255 (2006)
Bacon, D.F., Strom, R.E., Tarafdar, A.: Guava: a dialect of java without data races. In: OOPSLA (2000)
Bailey, D.H., et al.: The NAS parallel benchmarks. Intl. Journal of Supercomputer Applications 5(3) (1994)
Beckman, N.E., Bierhoff, K., Aldrich, J.: Verifying correct usage of atomic blocks and typestate. In: OOPSLA 2008 (2008)
Bierhoff, K., Aldrich, J.: Modular typestate checking of aliased objects. In: OOPSLA 2007 (2007)
Bocchino, R.L., et al.: A type and effect system for deterministic parallel java. In: OOPSLA 2009 (2009)
Bocchino, R.L., et al.: Safe nondeterminism in a deterministic-by-default parallel language. In: POPL 2011 (2011)
Boehm, H.-J., Adve, S.V.: Foundations of the c++ concurrency memory model. In: PLDI (2008)
Bornat, R., Calcagno, C., O’Hearn, P., Parkinson, M.: Permission accounting in separation logic. In: POPL (2005)
Bornat, R., Calcagno, C., Yang, H.: Variables as resource in separation logic. Electron. Notes Theor. Comput. Sci. 155, 247–276 (2006)
Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: preventing data races and deadlocks. In: OOPSLA 2002 (2002)
Boyland, J.: Checking Interference with Fractional Permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 55–72. Springer, Heidelberg (2003)
Boyland, J.: Semantics of fractional permissions with nesting. ACM Trans. Program. Lang. Syst. 32 (2010)
Cavé, V., Zhao, J., Shirako, J., Sarkar, V.: Habanero-java: the new adventures of old X10. In: Proceedings of the 9th International Conference on the Principles and Practice of Programming in Java, PPPJ (2011)
Clarke, D.G., Potter, J.M., Noble, J.: Ownership types for flexible alias protection. In: OOPSLA (1998)
Dodds, M., Jagannathan, S., Parkinson, M.J.: Modular reasoning for deterministic parallelism. In: POPL 2011 (2011)
Duran, A., et al.: Barcelona openmp tasks suite: A set of benchmarks targeting the exploitation of task parallelism in openmp. In: ICPP (2009)
Fahndrich, M., DeLine, R.: Adoption and focus: practical linear types for imperative programming. In: PLDI (2002)
Flanagan, C., Freund, S.N.: Type-based race detection for java. In: PLDI (2000)
Haller, P., Odersky, M.: Capabilities for Uniqueness and Borrowing. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 354–378. Springer, Heidelberg (2010)
Heule, S., et al.: Fractional permissions without the fractions. In: Proceedings of the 13th Workshop on Formal Techniues for Java-Like Programs, FTfJP (2011)
Joyner, M.: Array Optimizations for High Productivity Programming Languages. PhD thesis, Rice University (2008)
Manson, J., Pugh, W., Adve, S.V.: The java memory model. In: POPL 2005 (2005)
Marino, D., et al.: DRFx: a simple and efficient memory model for concurrent programming languages. In: Proceedings of PLDI 2010 (2010)
Naik, M., Aiken, A., Whaley, J.: Effective static race detection for java. In: PLDI (2006)
Nanevski, A., Morrisett, G., Birkedal, L.: Hoare type theory, polymorphism and separation. J. Funct. Program. 18, 865–911 (2008)
Shirako, J., Kasahara, H., Sarkar, V.: Language Extensions in Support of Compiler Parallelization. In: Adve, V., Garzarán, M.J., Petersen, P. (eds.) LCPC 2007. LNCS, vol. 5234, pp. 78–94. Springer, Heidelberg (2008)
Siek, J.G., Taha, W.: Gradual typing for functional languages. In: Scheme and Functional Programming Workshop (2006)
Singh, A., et al.: Efficient processor support for DRFx, a memory model with exceptions. In: Proceedings of ASPLOS 2011 (2011)
Smith, L.A., Bull, J.M., Obdrzálek, J.: A parallel java grande benchmark suite. In: Proceedings of the 2001 ACM/IEEE Conference on Supercomputing (2001)
Vallée-Rai, R., Hendren, L., Sundaresan, V., Lam, P., Gagnon, E., Co, P.: Soot - a java optimization framework. In: Proceedings of CASCON 1999 (1999)
Vaziri, M., Tip, F., Dolby, J.: Associating synchronization constraints with data in an object-oriented language. In: POPL (2006)
Vaziri, M., Tip, F., Dolby, J., Hammer, C., Vitek, J.: A Type System for Data-Centric Synchronization. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 304–328. Springer, Heidelberg (2010)
Westbrook, E., Zhao, J., Budimlić, Z., Sarkar, V.: Permission regions for race-free parallelism. In: RV (2011)
Wolff, R., Garcia, R., Tanter, É., Aldrich, J.: Gradual Typestate. In: Mezini, M. (ed.) ECOOP 2011. LNCS, vol. 6813, pp. 459–483. Springer, Heidelberg (2011)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Westbrook, E., Zhao, J., Budimlić, Z., Sarkar, V. (2012). Practical Permissions for Race-Free Parallelism. In: Noble, J. (eds) ECOOP 2012 – Object-Oriented Programming. ECOOP 2012. Lecture Notes in Computer Science, vol 7313. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-31057-7_27
Download citation
DOI: https://doi.org/10.1007/978-3-642-31057-7_27
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-31056-0
Online ISBN: 978-3-642-31057-7
eBook Packages: Computer ScienceComputer Science (R0)