skip to main content
research-article

Automatic atomic region identification in shared memory SPMD programs

Published:17 October 2010Publication History
Skip Abstract Section

Abstract

This paper presents TransFinder, a compile-time tool that automatically determines which statements of an unsynchronized multithreaded program must be enclosed in atomic regions to enforce conflict-serializability. Unlike previous tools, TransFinder requires no programmer input (beyond the program) and is more efficient in both time and space.

Our implementation shows that the generated atomic regions range from being identical to, or smaller than, the programmer-specified transactions in the three Java Grande benchmarks considered, and in five of the eight STAMP benchmarks considered, while still providing identical synchronization semantics and results. The generated atomic regions are between 5 and 38 lines larger in the three remaining STAMP benchmarks. In the most conservative case, TransFinder can, based on the program structure, successfully identify and suggest an alternative that conforms exactly to the programmer-specified atomic regions. By generating small, highly-targeted, conflict-serializable atomic regions, TransFinder allows the programmer to focus further tuning efforts on only a small portion of the code (when further tuning is needed).

References

  1. }}D. Agrawal, J. L. Bruno, A. El Abbadi, and V. Krishnaswamy. Relative serializability (extended abstract): an approach for relaxing the atomicity of transactions. In PODS '94: Proceedings of the ACM Symposium on Principles of Database Systems, pages 139--149, New York, NY, USA, 1994. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. }}D. A. Bader and K. Madduri. Design and implementation of the hpcs graph analysis benchmark on symmetric multiprocessors. In HiPC '05: Proceedings of the High Performance Computing Conference, pages 465--476, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}R. Bayer. Consistency of transactions and random batch. ACM Transactions on Database Systems, 11(4):397--404, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}Brad Appleton. Sclc and Cdiff: Perl scripts for ClearCase. At http://www.cmcrossroads.com/broadapp/clearperl/sclc-cdiff.html.Google ScholarGoogle Scholar
  5. }}M. J. Cahill, U. Röhm, and A. D. Fekete. Serializable isolation for snapshot databases. In SIGMOD '08: Proceedings of the ACM International Conference on Management of Data, pages 729--738, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}C. Cao Minh, J. Chung, C. Kozyrakis, and K. Olukotun. STAMP: Stanford transactional applications for multi-processing. In IISWC '08: Proceedings of The IEEE International Symposium on Workload Characterization, September 2008.Google ScholarGoogle ScholarCross RefCross Ref
  7. }}S. Cherem, T. M. Chilimbi, and S. Gulwani. Inferring locks for atomic sections. In PLDI '08: Proceedings of the ACM Conference on Programming Language Design and Implementation, pages 304--315, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. }}J.-D. Choi, K. Lee, A. Loginov, R. O'Callahan, V. Sarkar, and M. Sridharan. Efficient and precise datarace detection for multithreaded object-oriented programs. In PLDI '02: Proceedings of the ACM Conference on Programming Language Design and Implementation, pages 258--269, New York, NY, USA, 2002. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. }}M. Christiaens and K. De Bosschere. Trade, a topological approach to on-the-fly race detection in Java programs. In JVM'01: Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium, pages 15--15, Berkeley, CA, USA, 2001. USENIX Association. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. }}R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems, 13(4):451--490, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}D. Dice, O. Shalev, and N. Shavit. Transactional Locking II. In Proceedings of the International Symposium on Distributed Computing, pages 194--208, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. }}A. Dragojević, R. Guerraoui, and M. Kapalka. Stretching transactional memory. In PLDI '09: Proceedings of the ACM Conference on Programming Language Design and Implementation, pages 155--165, New York, NY, USA, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}R. Elmasri and S. B. Navathe. Fundamentals of Database Systems (5th Edition). Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. }}M. Emmi, J. S. Fischer, R. Jhala, and R. Majumdar. Lock allocation. In POPL '07: Proceedings of the ACM Symposium on Principles of Programming Languages, pages 291--296, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. }}EPCC. The Java Grande Forum Benchmark Suite. At http://www.epcc.ed.ac.uk/research/java-grande/. Last accessed March 24, 2010.Google ScholarGoogle Scholar
  16. }}P. Felber, C. Fetzer, and T. Riegel. Dynamic performance tuning of word-based software transactional memory. In PPoPP '08: Proceedings of the ACM Symposium on Principles and Practice of Parallel Programming, pages 237--246, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. }}R. L. Halpert, C. J. Pickett, and C. Verbrugge. Component-based lock allocation. In PACT '07: Proceedings of the International Conference on Parallel Architectures and Compilation Techniques, pages 353--364, Los Alamitos, CA, USA, 2007. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}T. Harris, S. Marlow, S. Peyton-Jones, and M. Herlihy. Composable memory transactions. In PPoPP '05: Proceedings of the Tenth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 48--60, New York, NY, USA, 2005. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. }}M. Herlihy, V. Luchangco, M. Moir, and W. N. Scherer. Software transactional memory for dynamic-sized data structures. In PODC '03: Proceedings of the Symposium on Principles of Distributed Computing, pages 92--101, New York, NY, USA, 2003. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. }}M. Herlihy, J. E. B. Moss, J. Eliot, and B. Moss. Transactional memory: Architectural support for lock-free data structures. In Proceedings of the 20th Annual International Symposium on Computer Architecture, pages 289--300, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. }}M. Hicks, J. S. Foster, and P. Prattikakis. Lock inference for atomic sections. In Proceedings of the First ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing, June 2006.Google ScholarGoogle Scholar
  22. }}A. Krishnamurthy and K. Yelick. Analyses and optimizations for shared address space programs. Journal of Parallel and Distributed Computing, 38(2):130--144, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. }}J. Lee, D. A. Padua, and S. P. Midkiff. Basic compiler algorithms for parallel programs. In PPoPP '99: Proceedings of the ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 1--12, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. }}O. Lhoták and L. Hendren. Scaling Java points-to analysis using Spark. In G. Hedin, editor, Proceedings of the International Conference on Compiler Construction, volume 2622 of LNCS, pages 153--169, Warsaw, Poland, April 2003. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. }}B. McCloskey, F. Zhou, D. Gay, and E. Brewer. Autolocker: synchronization inference for atomic sections. In POPL '06: Proceedings of the ACM Symposium on Principles of Programming Languages, pages 346--358, New York, NY, USA, 2006. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. }}M. Moir, K. Moore, and D. Nussbaum. The adaptive transactional memory test platform: a tool for experimenting with transactional code for rock (poster). In SPAA '08: Proceedings of the Symposium on Parallelism in Algorithms and Architectures, pages 362--362, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. }}M. Naik, A. Aiken, and J. Whaley. Effective static race detection for java. In PLDI '06: Proceedings of the ACM Conference on Programming Language Design and Implementation, pages 308--319, New York, NY, USA, 2006. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. }}R. O'Callahan and J.-D. Choi. Hybrid dynamic data race detection. In PPoPP '03: Proceedings of the ACM Symposium on Principles and Practice of Parallel Programming, pages 167--178, New York, NY, USA, 2003. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. }}M. C. Rinard and P. C. Diniz. Commutativity analysis: A new analysis technique for parallelizing compilers. ACM Transactions on Programming Languages and Systems, 19(6):1--47, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. }}S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: a dynamic data race detector for multithreaded programs. ACM Transactions on Computer Systems, 15(4):391--411, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. }}D. Shasha, F. Llirbat, E. Simon, and P. Valduriez. Transaction chopping: algorithms and performance studies. ACM Transactions on Database Systems, 20(3):325--363, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. }}D. Shasha and M. Snir. Efficient and correct execution of parallel programs that share memory. ACM Transactions on Programming Languages and Systems, 10(2):282--312, April 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. }}N. Shavit and D. Touitou. Software transactional memory. In Proceedings of the Symposium on Principles of Distributed Computing, pages 204--213, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. }}T. Shpeisman, V. Menon, A.-R. Adl-Tabatabai, S. Balensiefer, D. Grossman, R. L. Hudson, K. F. Moore, and B. Saha. Enforcing isolation and ordering in S™. In PLDI '07: Proceedings of the ACM Conference on Programming Language Design and Implementation, pages 78--88, New York, NY, USA, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. }}G. Upadhyaya, S. P. Midkiff, and V. S. Pai. Using data structure knowledge for efficient lock generation and strong atomicity. In PPoPP '10: Proceedings of the ACM Symposium on Principles and Practice Of Parallel Programming, pages 281--292, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. }}R. Vallee-Rai, E. Gagnon, L. J. Hendren, P. Lam, P. Pominville, and V. Sundaresan. Optimizing Java bytecode using the Soot framework: Is it feasible? In Proceedings of the International Conference on Compiler Construction (CC '09), pages 18--34, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. }}M. T. Vechev, E. Yahav, and G. Yorsh. Inferring synchronization under limited observability. In TACAS '09: Proceedings of the International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 139--154, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. }}M. T. Vechev, E. Yahav, and G. Yorsh. Abstraction-guided synthesis of synchronization. In POPL '10: Proceegings of the ACM Symposium on Principles of Programming Languages, pages 327--338, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. }}H. Volos, N. Goyal, and M. Swift. Pathological interaction of locks with transactional memory. In Proceedings of the ACM Workshop on Transactional Computing (TRANSACT) '08, 2008. article available at http://www.unine.ch/transact08/papers/Volos-Pathological.pdf. URL last checked on Nov. 19, 2009.Google ScholarGoogle Scholar
  40. }}O. Wolfson. The virtues of locking by symbolic names. Journal of Algorithms, 8(4):536--556, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. }}Y. Zhang, V. C. Sreedhar, W. Zhu, V. Sarkar, and G. R. Gao. Minimum lock assignment: A method for exploiting concurrency among critical sections. In Proceedings of the 21st Annual Workshop on Languages and Compilers for Parallel Computing (LCPC '08), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. }}L. Ziarek, A. Welc, A.-R. Adl-Tabatabai, V. Menon, T. Shpeisman, and S. Jagannathan. A uniform transactional execution environment for Java. In ECOOP '08: Proceedings of the European Conference on Object-Oriented Programming, pages 129--154, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Automatic atomic region identification in shared memory SPMD programs

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!