Skip to main content

Towards Transactional Memory for OpenMP

  • Conference paper
Using and Improving OpenMP for Devices, Tasks, and More (IWOMP 2014)

Abstract

The OpenMP specification lacks a composable shared memory concurrency mechanism: the current OpenMP concurrency mechanisms, such as OMP critical, locks, or atomics, do not support composition. In this paper, we motivate the need for transactional memory (TM) in OpenMP. The chief reason is to support composition of realistic programs, but we also consider whether TM is easier to program than locks, the use case for TM, and whether a software-only TM can outperform traditional locking through a survey of recent publications. This paper advances upon previous proposals of OpenMP TM by introducing a new construct specifically to handle irrevocable actions, which is also composable. It also proposes a pure atomic transaction construct as well as the concept of transaction safety. Further, we examine how our proposed construct integrates with current OpenMP constructs.

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. Sutter, H.: The pillars of concurrency. Dr. Dobbs (July 2007)

    Google Scholar 

  2. OpenMP ARB.: OpenMP Application Program Interface, v. 4.0 (June 2013)

    Google Scholar 

  3. Bihari, B.L., Wong, M., Wang, A., de Supinski, B.R., Chen, W.: A case for including transactions in OpenMP II: Hardware transactional memory. In: Chapman, B.M., Massaioli, F., Müller, M.S., Rorro, M. (eds.) IWOMP 2012. LNCS, vol. 7312, pp. 44–58. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  4. Herlihy, M., Shavit, N.: The Art of Multiprocessor Programming. Elsevier, Inc. (2008)

    Google Scholar 

  5. Rajwar, R., Goodman, J.R.: Speculative lock elision: Enabling highly concurrent multithreaded execution. In: 34th International Symposium on Microarchitecture, MICRO (2001)

    Google Scholar 

  6. Wong, M., Bihari, B.L., de Supinski, B.R., Wu, P., Michael, M., Liu, Y., Chen, W.: A case for including transactions in OpenMP. In: Sato, M., Hanawa, T., Müller, M.S., Chapman, B.M., de Supinski, B.R. (eds.) IWOMP 2010. LNCS, vol. 6132, pp. 149–160. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  7. Milovanović, M., Ferrer, R., Unsal, O.S., Cristal, A., Martorell, X., Ayguadé, E., Labarta, J., Valero, M.: Transactional memory and OpenMP. In: Chapman, B., Zheng, W., Gao, G.R., Sato, M., Ayguadé, E., Wang, D. (eds.) IWOMP 2007. LNCS, vol. 4935, pp. 37–53. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  8. Sutter, H.: The trouble with locks. Dr. Dobbs (March 2005)

    Google Scholar 

  9. Lee, E.A.: The problem with threads. Technical report, Electrical Engineering and Computer Sciences University of California at Berkeley (January 2006)

    Google Scholar 

  10. Wong, M., Boehm, H., Gottschlich, J., Shpeisman, T.: Transactional Language Constructs for C++ (January 2012), http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3341.pdf

  11. Scott, M.L., Spear, M.F., Dalessandro, L., Marathe, V.J.: Delaunay triangulation with transactions and barriers. In: Proceedings IEEE International Symposium on Workload Characterization (2007)

    Google Scholar 

  12. Kang, S., Bader, D.A.: An efficient transactional memory algorithm for computing minimum spanning forest of sparse graphs. In: Proceedings of the 14th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2009, pp. 15–24 (2009)

    Google Scholar 

  13. Ansari, M., Kotselidis, C., Watson, I., Kirkham, C., Luján, M., Jarvis, K.: Lee-TM: A non-trivial benchmark for transactional memory. In: Bourgeois, A.G., Zheng, S.Q. (eds.) ICA3PP 2008. LNCS, vol. 5022, pp. 196–207. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  14. Gajinov, V., Zyulkyarov, F., Unsal, O.S., Cristal, A., Ayguade, E., Harris, T., Valero, M.: QuakeTM: Parallelizing a complex sequential application using transactional memory. In: Proceedings of the 23rd International Conference on Supercomputing, ICS 2009, pp. 126–135 (2009)

    Google Scholar 

  15. Zyulkyarov, F., Gajinov, V., Unsal, O.S., Cristal, A., Ayguade, E., Harris, T., Valero, M.: Atomic Quake: Using transactional memory in an interactive multiplayer game server. In: Proceedings of the 14th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 25–34 (2009)

    Google Scholar 

  16. Abdelkhalek, A., Bilas, A.: Parallelization and performance of interactive multiplayer game servers. In: Proceedings of the 18th International Parallel and Distributed Processing Symposium, IPDPS (2004)

    Google Scholar 

  17. Lupei, D., Simion, B., Bogdan, P.D., Misler, M., Burcea, M., Krick, W., Amza, C.: Transactional memory support for scalable and transparent parallelization of multiplayer games. In: Proceedings of the 5th European Conference on Computer Systems, EuroSys 2010, pp. 41–54 (2010)

    Google Scholar 

  18. Guerraoui, R., Kapalka, M., Vitek, J.: STMBench7: A benchmark for software transactional memory. In: Proceedings of the 2Nd ACM SIGOPS/EuroSys European Conference on Computer Systems, EuroSys 2007, pp. 315–324 (2007)

    Google Scholar 

  19. Minh, C.C., Chung, J., Kozyrakis, C., Olukotun, K.: STAMP: Stanford transactional applications for multi-processing. In: Proceedings of The IEEE International Symposium on Workload Characterization, IISWC 2008, pp. 315–324 (2008)

    Google Scholar 

  20. Kestor, G., Stipic, S., Unsal, O., Cristal, A., Valero, M.: RMS-TM: A transactional memory benchmark for recognition, mining and synthesis applications. In: Proceedings 4th ACM SIGPLAN Workshop on Transactional Computing TRANSACT (2009)

    Google Scholar 

  21. Rossbach, C.J., Hofmann, O.S., Witchel, W.: Is transactional programming actually easier? In: Proceedings of the 15th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2010, pp. 47–56 (2010)

    Google Scholar 

  22. Pankratius, V., Adl-Tabatabai, A.: A study of transactional memory vs. locks in practice. In: Proceedings of the Twenty-third Annual ACM Symposium on Parallelism in Algorithms and Architectures, SPAA 2011, pp. 43–52 (2011)

    Google Scholar 

  23. Baek, W., Minh, C.C., Trautmann, M., Kozyrakis, C., Olukotun, K.: The opentm transactional application programming interface. In: Proceedings International Conference on Parallel Architectures and Compilation Techniques, PaCT 2007, pp. 376–387 (2007)

    Google Scholar 

  24. Gottschlich, J.E., Boehm, H.J.: Generic programming needs transactional memory. In: The 8th ACM SIGPLAN Workshop on Transactional Computing, TRANSACT (2013)

    Google Scholar 

  25. Transactional Memory Specification Drafting Group: Transactional language constructs for C++ (May 2014), https://sites.google.com/site/tmforcplusplus/

  26. Wong, M., Gottschlich, J.: SG5: Software Transactional Memory (TM) Status Report (September 2012), http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3422.pdf

  27. Luchangco, V., Wong, M.: Transactional Memory Support for C++ (February 2014), http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3919.pdf

  28. IBM: IBM XL C/C++ for Transactional Memory for AIX, V0.9 Language Extensions and Users Guide (May 2008), http://dl.alphaworks.ibm.com/technologies/xlcstm/xlcstm-whitepaper.pdf

  29. Sutter, H.: (May 2014), https://isocpp.org/std/status

  30. ISO C++ Standard: C++ Standard, aka C++11 (November 2011)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Consortia

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Wong, M. et al. (2014). Towards Transactional Memory for OpenMP. In: DeRose, L., de Supinski, B.R., Olivier, S.L., Chapman, B.M., Müller, M.S. (eds) Using and Improving OpenMP for Devices, Tasks, and More. IWOMP 2014. Lecture Notes in Computer Science, vol 8766. Springer, Cham. https://doi.org/10.1007/978-3-319-11454-5_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-11454-5_10

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-11453-8

  • Online ISBN: 978-3-319-11454-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics