Efficient Data Race Detection for Async-Finish Parallelism

  • Raghavan Raman
  • Jisheng Zhao
  • Vivek Sarkar
  • Martin Vechev
  • Eran Yahav
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6418)

Abstract

A major productivity hurdle for parallel programming is the presence of data races. Data races can lead to all kinds of harmful program behaviors, including determinism violations and corrupted memory. However, runtime overheads of current dynamic data race detectors are still prohibitively large (often incurring slowdowns of 10× or larger) for use in mainstream software development.

In this paper, we present an efficient dynamic race detector algorithm targeting the async-finish task-parallel parallel programming model. The async and finish constructs are at the core of languages such as X10 and Habanero Java (HJ). These constructs generalize the spawn-sync constructs used in Cilk, while still ensuring that all computation graphs are deadlock-free.

We have implemented our algorithm in a tool called TaskChecker and evaluated it on a suite of 12 benchmarks. To reduce overhead of the dynamic analysis, we have also implemented various static optimizations in the tool. Our experimental results indicate that our approach performs well in practice, incurring an average slowdown of 3.05× compared to a serial execution in the optimized case.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
  2. 2.
    Agarwal, S., Barik, R., Bonachea, D., Sarkar, V., Shyamasundar, R.K., Yelick, K.: Deadlock-free scheduling of X10 computations with bounded resources. In: SPAA 2007: Proceedings of the 19th symposium on Parallel algorithms and architectures, pp. 229–240. ACM, New York (2007)Google Scholar
  3. 3.
    Barik, R., Budimlic, Z., Cave, V., Chatterjee, S., Guo, Y., Peixotto, D., Raman, R., Shirako, J., Tasirlar, S., Yan, Y., Zhao, Y., Sarkar, V.: The habanero multicore software research project. In: OOPSLA 2009: Proceeding of the 24th ACM SIGPLAN conference companion on Object oriented programming systems languages and applications, pp. 735–736. ACM, New York (2009)Google Scholar
  4. 4.
    Barik, R., Sarkar, V.: Interprocedural Load Elimination for Dynamic Optimization of Parallel Programs. In: PACT 2009, Proceedings of the 18th International Conference on Parallel Architectures and Compilation Techniques, Washington, DC, USA, pp. 41–52. IEEE Computer Society, Los Alamitos (September 2009), http://dx.doi.org/10.1109/PACT.2009.32 CrossRefGoogle Scholar
  5. 5.
    Blumofe, R.D., Joerg, C.F., Kuszmaul, B.C., Leiserson, C.E., Randall, K.H., Zhou, Y.: Cilk: an efficient multithreaded runtime system. In: Proceedings of the Fifth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP, pp. 207–216 (October 1995)Google Scholar
  6. 6.
    Blumofe, R.D., Leiserson, C.E.: Scheduling multithreaded computations by work stealing. J. ACM 46(5), 720–748 (1999)MathSciNetCrossRefMATHGoogle Scholar
  7. 7.
    Bocchino, R., Adve, V., Adve, S., Snir, M.: Parallel programming must be deterministic by default. In: First USENIX Workship on Hot Topics in Parallelism, HOTPAR 2009 (2009)Google Scholar
  8. 8.
    Charles, P., Grothoff, C., Saraswat, V.A., Donawa, C., Kielstra, A., Ebcioglu, K., von Praun, C., Sarkar, V.: X10: an object-oriented approach to non-uniform cluster computing. In: Proceedings of the Twentieth Annual ACM SIGPLAN Conference on Obj ect-Oriented Programming, Systems, Languages, and Applications, OOPSLA, pp. 519–538 (October 2005)Google Scholar
  9. 9.
    Cheng, G.-I., Feng, M., Leiserson, C.E., Randall, K.H., Stark, A.F.: Detecting data races in cilk programs that use locks. In: Proceedings of the Tenth Annual ACM Symposium on Parallel Algorithms and Architectures (SPAA 1998), Puerto Vallarta, Mexico, June 28–July 2, pp. 298–309 (1998)Google Scholar
  10. 10.
    Choi, J.-D., Gupta, M., Serrano, M.J., Sreedhar, V.C., Midkiff, S.P.: Stack allocation and synchronization optimizations for Java using escape analysis. ACM Trans. Program. Lang. Syst. 25(6), 876–910 (2003), http://doi.acm.org/10.1145/945885.945892 CrossRefGoogle Scholar
  11. 11.
    Dijkstra, E.W.: Cooperating sequential processes, 65–138Google Scholar
  12. 12.
    Feng, M., Leiserson, C.E.: Efficient detection of determinacy races in cilk programs. In: SPAA 1997: Proceedings of the ninth annual ACM symposium on Parallel algorithms and architectures, pp. 1–11. ACM, New York (1997)Google Scholar
  13. 13.
    Flanagan, C., Freund, S.N.: Fasttrack: efficient and precise dynamic race detection. In: PLDI 2009: Proceedings of the 2009 ACM SIGPLAN conference on Programming language design and implementation, pp. 121–133. ACM, New York (2009)CrossRefGoogle Scholar
  14. 14.
    Larus, J.R., Rajwar, R.: Transactional Memory. Morgan and Claypool (2006)Google Scholar
  15. 15.
    Lea, D.: A java fork/join framework. In: JAVA 2000: Proceedings of the ACM, conference on Java Grande, pp. 36–43. ACM, New York (2000)CrossRefGoogle Scholar
  16. 16.
    Lee, E.A.: The problem with threads. Computer 39(5), 33–42 (2006)CrossRefGoogle Scholar
  17. 17.
    Lee, J.K., Palsberg, J.: Featherweight x10: a core calculus for async-finish parallelism. In: PPoPP 2010: Proceedings of the 15th ACM SIGPLAN symposium on Principles and practice of parallel computing, pp. 25–36. ACM, New York (2010)Google Scholar
  18. 18.
    Leijen, D., Schulte, W., Burckhardt, S.: The design of a task parallel library. In: OOPSLA 2009: Proceeding of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications, pp. 227–242. ACM, New York (2009)CrossRefGoogle Scholar
  19. 19.
    Mellor-Crummey, J.: Compile-time support for efficient data race detection in shared-memory parallel programs. In: PADD 1993: Proceedings of the 1993 ACM/ONR workshop on Parallel and distributed debugging, pp. 129–139. ACM, New York (1993)CrossRefGoogle Scholar
  20. 20.
    Sadowski, C., Freund, S.N., Flanagan, C.: SingleTrack: A dynamic determinism checker for multithreaded programs. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 394–409. Springer, Heidelberg (2009)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Raghavan Raman
    • 1
  • Jisheng Zhao
    • 1
  • Vivek Sarkar
    • 1
  • Martin Vechev
    • 2
  • Eran Yahav
    • 2
  1. 1.Rice UniversityUSA
  2. 2.IBM T. J. Watson Research CenterUSA

Personalised recommendations