Permission Regions for Race-Free Parallelism

  • Edwin Westbrook
  • Jisheng Zhao
  • Zoran Budimlić
  • Vivek Sarkar
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7186)


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.


Parallel Task Transactional Memory Benchmark Suite Data Race Insertion Algorithm 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Agarwal, et al.: May-happen-in-parallel analysis of x10 programs. In: PPoPP 2007 (2007)Google Scholar
  2. 2.
    Agrawal, K., Fineman, J.T., Sukha, J.: Nested parallelism in transactional memory. In: PPoPP 2008, pp. 163–174 (2008)Google Scholar
  3. 3.
    Artho, C., Havelund, K., Biere, A.: High-level data races. In: STVR 2003, vol. 13(4), pp. 207–227 (2003)Google Scholar
  4. 4.
    Bacon, D.F., Strom, R.E., Tarafdar, A.: Guava: a dialect of java without data races. In: OOPSLA 2000, pp. 382–400 (2000)Google Scholar
  5. 5.
    Bocchino, J.R.L., et al.: A type and effect system for deterministic parallel java. In: OOPSLA 2009 (2009)Google Scholar
  6. 6.
    Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: preventing data races and deadlocks. In: OOPSLA 2002, pp. 211–230 (2002)Google Scholar
  7. 7.
    Boyland, J.: Checking Interference with Fractional Permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, Springer, Heidelberg (2003)CrossRefGoogle Scholar
  8. 8.
    Boyland, J., Retert, W., Zhao, Y.: Comprehending annotations on object-oriented programs using fractional permissions. In: IWACO 2009 (2009)Google Scholar
  9. 9.
    Cavé, V., et al.: Habanero-Java: the New Adventures of Old X10. In: PPPJ 2011 (2011)Google Scholar
  10. 10.
    Charles, P., et al.: X10: an object-oriented approach to non-uniform cluster computing. In: OOPSLA 2005, pp. 519–538. ACM, New York (2005)CrossRefGoogle Scholar
  11. 11.
    Duran, A., et al.: Barcelona openmp tasks suite: A set of benchmarks targeting the exploitation of task parallelism in openmp. In: ICPP 2009 (2009)Google Scholar
  12. 12.
    Elmas, T., Qadeer, S., Tasiran, S.: Goldilocks: a race and transaction-aware java runtime. In: PLDI 2007 (2007)Google Scholar
  13. 13.
    Bailey, D.H., et al.: The nas parallel benchmarks (1994)Google Scholar
  14. 14.
    Feng, M., Leiserson, C.E.: Efficient detection of determinacy races in cilk programs. In: SPAA 1997, pp. 1–11 (1997)Google Scholar
  15. 15.
    Flanagan, C., Freund, S.N.: Type-based race detection for java. In: PLDI 2000, pp. 219–232 (2000)Google Scholar
  16. 16.
    Flanagan, C., Freund, S.N.: Atomizer: a dynamic atomicity checker for multithreaded programs. In: POPL 2004, pp. 256–267 (2004)Google Scholar
  17. 17.
    Flanagan, C., Freund, S.N.: Fasttrack: efficient and precise dynamic race detection. In: PLDI 2009, pp. 121–133. ACM, New York (2009)CrossRefGoogle Scholar
  18. 18.
    Gosling, J., Joy, B., Steele, G., Bracha, G.: The JavaTM Language Specification, 3rd edn. Addison Wesley (2005)Google Scholar
  19. 19.
    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)CrossRefGoogle Scholar
  20. 20.
    Hammer, C., et al.: Dynamic detection of atomic-set-serializability violations. In: ICSE 2008, pp. 231–240 (2008)Google Scholar
  21. 21.
    Henzinger, T.A., Jhala, R., Majumdar, R.: Race checking by context inference. In: PLDI 2004, pp. 1–13 (2004)Google Scholar
  22. 22.
    Joyner, M.: Array Optimizations for High Productivity Programming Languages. PhD thesis, Rice University (2008)Google Scholar
  23. 23.
    Lamport, L.: How to Make a Multiprocessor Computer that Correctly Executes Multiprocess Programs. IEEE Trans. on Computers C-28(9), 690–691 (1979)CrossRefGoogle Scholar
  24. 24.
    Larus, J.R., Rajwar, R.: Transactional Memory. Morgan & Claypool (2006)Google Scholar
  25. 25.
    Lucia, B., et al.: Conflict exceptions: simplifying concurrent language semantics with precise hardware exceptions for data-races. In: ISCA 2010 (2010)Google Scholar
  26. 26.
    Manson, J., Pugh, W., Adve, S.V.: The java memory model. In: POPL 2005, pp. 378–391 (2005)Google Scholar
  27. 27.
    Marino, D., et al.: Drfx: a simple and efficient memory model for concurrent programming languages. In: PLDI 2010, pp. 351–362 (2010)Google Scholar
  28. 28.
    Marino, D., Musuvathi, M., Narayanasamy, S.: Literace: effective sampling for lightweight data-race detection. In: PLDI 2009, pp. 134–143 (2009)Google Scholar
  29. 29.
    Naik, M., Aiken, A., Whaley, J.: Effective static race detection for java. In: PLDI 2006, pp. 308–319 (2006)Google Scholar
  30. 30.
    O’Callahan, R., Choi, J.-D.: Hybrid dynamic data race detection. In: PPoPP 2003, pp. 167–178 (2003)Google Scholar
  31. 31.
    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)CrossRefGoogle Scholar
  32. 32.
    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)CrossRefGoogle Scholar
  33. 33.
    Roberson, M., Boyapati, C.: A static analysis for automatic detection of atomicity violations in java programs. draft available on second author’s websites (2010)Google Scholar
  34. 34.
    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)Google Scholar
  35. 35.
    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)CrossRefGoogle Scholar
  36. 36.
    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)CrossRefGoogle Scholar
  37. 37.
    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)CrossRefGoogle Scholar
  38. 38.
    Singh, A., et al.: Efficient processor support for DRFx, a memory model with exceptions. In: ASPLOS 2011 (2011)Google Scholar
  39. 39.
    Smith, L.A., Bull, J.M., Obdrzálek, J.: A parallel java grande benchmark suite. In: Proceedings of SC (2001)Google Scholar
  40. 40.
    Vaziri, M., Tip, F., Dolby, J.: Associating synchronization constraints with data in an object-oriented language. In: POPL 2006 (2006)Google Scholar
  41. 41.
    Š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)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Edwin Westbrook
    • 1
  • Jisheng Zhao
    • 1
  • Zoran Budimlić
    • 1
  • Vivek Sarkar
    • 1
  1. 1.Department of Computer ScienceRice UniversityUSA

Personalised recommendations