Skip to main content

Permission Regions for Race-Free Parallelism

  • Conference paper
Runtime Verification (RV 2011)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7186))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Agarwal, et al.: May-happen-in-parallel analysis of x10 programs. In: PPoPP 2007 (2007)

    Google Scholar 

  2. Agrawal, K., Fineman, J.T., Sukha, J.: Nested parallelism in transactional memory. In: PPoPP 2008, pp. 163–174 (2008)

    Google Scholar 

  3. Artho, C., Havelund, K., Biere, A.: High-level data races. In: STVR 2003, vol. 13(4), pp. 207–227 (2003)

    Google Scholar 

  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. Bocchino, J.R.L., et al.: A type and effect system for deterministic parallel java. In: OOPSLA 2009 (2009)

    Google Scholar 

  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. Boyland, J.: Checking Interference with Fractional Permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  8. Boyland, J., Retert, W., Zhao, Y.: Comprehending annotations on object-oriented programs using fractional permissions. In: IWACO 2009 (2009)

    Google Scholar 

  9. Cavé, V., et al.: Habanero-Java: the New Adventures of Old X10. In: PPPJ 2011 (2011)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  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. Elmas, T., Qadeer, S., Tasiran, S.: Goldilocks: a race and transaction-aware java runtime. In: PLDI 2007 (2007)

    Google Scholar 

  13. Bailey, D.H., et al.: The nas parallel benchmarks (1994)

    Google Scholar 

  14. Feng, M., Leiserson, C.E.: Efficient detection of determinacy races in cilk programs. In: SPAA 1997, pp. 1–11 (1997)

    Google Scholar 

  15. Flanagan, C., Freund, S.N.: Type-based race detection for java. In: PLDI 2000, pp. 219–232 (2000)

    Google Scholar 

  16. Flanagan, C., Freund, S.N.: Atomizer: a dynamic atomicity checker for multithreaded programs. In: POPL 2004, pp. 256–267 (2004)

    Google Scholar 

  17. Flanagan, C., Freund, S.N.: Fasttrack: efficient and precise dynamic race detection. In: PLDI 2009, pp. 121–133. ACM, New York (2009)

    Chapter  Google Scholar 

  18. Gosling, J., Joy, B., Steele, G., Bracha, G.: The JavaTM Language Specification, 3rd edn. Addison Wesley (2005)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  20. Hammer, C., et al.: Dynamic detection of atomic-set-serializability violations. In: ICSE 2008, pp. 231–240 (2008)

    Google Scholar 

  21. Henzinger, T.A., Jhala, R., Majumdar, R.: Race checking by context inference. In: PLDI 2004, pp. 1–13 (2004)

    Google Scholar 

  22. Joyner, M.: Array Optimizations for High Productivity Programming Languages. PhD thesis, Rice University (2008)

    Google Scholar 

  23. Lamport, L.: How to Make a Multiprocessor Computer that Correctly Executes Multiprocess Programs. IEEE Trans. on Computers C-28(9), 690–691 (1979)

    Article  Google Scholar 

  24. Larus, J.R., Rajwar, R.: Transactional Memory. Morgan & Claypool (2006)

    Google Scholar 

  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. Manson, J., Pugh, W., Adve, S.V.: The java memory model. In: POPL 2005, pp. 378–391 (2005)

    Google Scholar 

  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. Marino, D., Musuvathi, M., Narayanasamy, S.: Literace: effective sampling for lightweight data-race detection. In: PLDI 2009, pp. 134–143 (2009)

    Google Scholar 

  29. Naik, M., Aiken, A., Whaley, J.: Effective static race detection for java. In: PLDI 2006, pp. 308–319 (2006)

    Google Scholar 

  30. O’Callahan, R., Choi, J.-D.: Hybrid dynamic data race detection. In: PPoPP 2003, pp. 167–178 (2003)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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. 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. 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)

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  38. Singh, A., et al.: Efficient processor support for DRFx, a memory model with exceptions. In: ASPLOS 2011 (2011)

    Google Scholar 

  39. Smith, L.A., Bull, J.M., Obdrzálek, J.: A parallel java grande benchmark suite. In: Proceedings of SC (2001)

    Google Scholar 

  40. Vaziri, M., Tip, F., Dolby, J.: Associating synchronization constraints with data in an object-oriented language. In: POPL 2006 (2006)

    Google Scholar 

  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)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics