Abstract
It is difficult to write parallel programs that are correct. This is because of the potential for data races, when parallel tasks access shared data in complex and unexpected ways. A classic approach to addressing this problem is dynamic race detection, which has the benefits of working transparently to the programmer and not raising any false alarms. Unfortunately, dynamic race detection is very slow in practice; further, it can only detect low-level races, not high-level races which are also known as atomicity violations. In this paper, we present a new approach to dynamic detection of data races and atomicity violations based on the concept of permission regions, which are regions of code that have permission to read or write certain variables. Dynamic checks are used to ensure that no conflicting permission regions execute in parallel, thereby allowing the granularity of checks to be adjusted according to the size of permission regions. We demonstrate that permission regions can be used to achieve significantly better performance than past work on dynamic race detection, to the point where they could be used to enable always on race detection for both low- and high-level races in production code.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Agarwal, et al.: May-happen-in-parallel analysis of x10 programs. In: PPoPP 2007 (2007)
Agrawal, K., Fineman, J.T., Sukha, J.: Nested parallelism in transactional memory. In: PPoPP 2008, pp. 163–174 (2008)
Artho, C., Havelund, K., Biere, A.: High-level data races. In: STVR 2003, vol. 13(4), pp. 207–227 (2003)
Bacon, D.F., Strom, R.E., Tarafdar, A.: Guava: a dialect of java without data races. In: OOPSLA 2000, pp. 382–400 (2000)
Bocchino, J.R.L., et al.: A type and effect system for deterministic parallel java. In: OOPSLA 2009 (2009)
Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: preventing data races and deadlocks. In: OOPSLA 2002, pp. 211–230 (2002)
Boyland, J.: Checking Interference with Fractional Permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, Springer, Heidelberg (2003)
Boyland, J., Retert, W., Zhao, Y.: Comprehending annotations on object-oriented programs using fractional permissions. In: IWACO 2009 (2009)
Cavé, V., et al.: Habanero-Java: the New Adventures of Old X10. In: PPPJ 2011 (2011)
Charles, P., et al.: X10: an object-oriented approach to non-uniform cluster computing. In: OOPSLA 2005, pp. 519–538. ACM, New York (2005)
Duran, A., et al.: Barcelona openmp tasks suite: A set of benchmarks targeting the exploitation of task parallelism in openmp. In: ICPP 2009 (2009)
Elmas, T., Qadeer, S., Tasiran, S.: Goldilocks: a race and transaction-aware java runtime. In: PLDI 2007 (2007)
Bailey, D.H., et al.: The nas parallel benchmarks (1994)
Feng, M., Leiserson, C.E.: Efficient detection of determinacy races in cilk programs. In: SPAA 1997, pp. 1–11 (1997)
Flanagan, C., Freund, S.N.: Type-based race detection for java. In: PLDI 2000, pp. 219–232 (2000)
Flanagan, C., Freund, S.N.: Atomizer: a dynamic atomicity checker for multithreaded programs. In: POPL 2004, pp. 256–267 (2004)
Flanagan, C., Freund, S.N.: Fasttrack: efficient and precise dynamic race detection. In: PLDI 2009, pp. 121–133. ACM, New York (2009)
Gosling, J., Joy, B., Steele, G., Bracha, G.: The JavaTM Language Specification, 3rd edn. Addison Wesley (2005)
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)
Hammer, C., et al.: Dynamic detection of atomic-set-serializability violations. In: ICSE 2008, pp. 231–240 (2008)
Henzinger, T.A., Jhala, R., Majumdar, R.: Race checking by context inference. In: PLDI 2004, pp. 1–13 (2004)
Joyner, M.: Array Optimizations for High Productivity Programming Languages. PhD thesis, Rice University (2008)
Lamport, L.: How to Make a Multiprocessor Computer that Correctly Executes Multiprocess Programs. IEEE Trans. on Computers C-28(9), 690–691 (1979)
Larus, J.R., Rajwar, R.: Transactional Memory. Morgan & Claypool (2006)
Lucia, B., et al.: Conflict exceptions: simplifying concurrent language semantics with precise hardware exceptions for data-races. In: ISCA 2010 (2010)
Manson, J., Pugh, W., Adve, S.V.: The java memory model. In: POPL 2005, pp. 378–391 (2005)
Marino, D., et al.: Drfx: a simple and efficient memory model for concurrent programming languages. In: PLDI 2010, pp. 351–362 (2010)
Marino, D., Musuvathi, M., Narayanasamy, S.: Literace: effective sampling for lightweight data-race detection. In: PLDI 2009, pp. 134–143 (2009)
Naik, M., Aiken, A., Whaley, J.: Effective static race detection for java. In: PLDI 2006, pp. 308–319 (2006)
O’Callahan, R., Choi, J.-D.: Hybrid dynamic data race detection. In: PPoPP 2003, pp. 167–178 (2003)
Qadeer, S., Rehof, J.: Context-Bounded Model Checking of Concurrent Software. In: Halbwachs, N., Zuck, L.D. (eds.) TACAS 2005. LNCS, vol. 3440, pp. 93–107. Springer, Heidelberg (2005)
Raman, R., Zhao, J., Sarkar, V., Vechev, M., Yahav, E.: Efficient Data Race Detection for Async-Finish Parallelism. In: Barringer, H., Falcone, Y., Finkbeiner, B., Havelund, K., Lee, I., Pace, G., Roşu, G., Sokolsky, O., Tillmann, N. (eds.) RV 2010. LNCS, vol. 6418, pp. 368–383. Springer, Heidelberg (2010)
Roberson, M., Boyapati, C.: A static analysis for automatic detection of atomicity violations in java programs. draft available on second author’s websites (2010)
Robert, J., Bocchino, L., Heumann, S., Honarmand, N., Adve, S.V., Adve, V.S., Welc, A., Shpeisman, T.: Safe nondeterminism in a deterministic-by-default parallel language. In: POPL 2011 (2011)
Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.: Eraser: a dynamic data race detector for multithreaded programs. ACM Trans. Comput. Syst. 15, 391–411 (1997)
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)
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)
Singh, A., et al.: Efficient processor support for DRFx, a memory model with exceptions. In: ASPLOS 2011 (2011)
Smith, L.A., Bull, J.M., Obdrzálek, J.: A parallel java grande benchmark suite. In: Proceedings of SC (2001)
Vaziri, M., Tip, F., Dolby, J.: Associating synchronization constraints with data in an object-oriented language. In: POPL 2006 (2006)
Ševčík, J., Aspinall, D.: On Validity of Program Transformations in the Java Memory Model. In: Ryan, M. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 27–51. Springer, Heidelberg (2008)
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). Permission Regions for Race-Free Parallelism. In: Khurshid, S., Sen, K. (eds) Runtime Verification. RV 2011. Lecture Notes in Computer Science, vol 7186. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-29860-8_8
Download citation
DOI: https://doi.org/10.1007/978-3-642-29860-8_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-29859-2
Online ISBN: 978-3-642-29860-8
eBook Packages: Computer ScienceComputer Science (R0)