CERN Computing Seminar

Are locks tying you down into knots and is Transactional Memory the answer?

by Michael Wong (IBM and OpenMP)

31/3-004 - IT Amphitheatre (CERN)

31/3-004 - IT Amphitheatre


Show room on map

Locks are complicated but the complication is unavoidable in real code, even though they do not compose with other locks. Locks are even more impractical for generic programming, because ordering of locks is generally not visible until instantiation. With the introduction of locking (and atomics) in C++11, this now becomes a difficult problem to avoid if you continue to want to use templates.

We know Transactional memory has been one promising way to solve the problem, but it was always thought to be a research toy. No more! Transactional Memory is being willed into reality with full integration into C++, and maybe OpenMP, urged by Hardware and compiler support.

TM Hardware is here, with Intel's Haswell and Broadwell, IBM's BG/Q and Power 8, and previously Sun's Rock. Software TM support has been here for quite some time with Intel's STM, IBM's BG compilers and most recently GCC C++ 4.7.

ISO C++ will most likely approve a Transactional Memory Technical Specification this year. This proposal has two types of transactions based on V1.1 of the Draft Transactional Memory for C++ that has been worked on since 2008.

The ISO C++ proposal supports 2 types of transactions as software but can be augmented through hardware:

  • an isolated transaction that isolates from non-transactional code (as well as other transactions)
  • an ordinary transaction that allows communication with non-transactional code

In this talk which is both a reference and a tutorial, I will present the proposal for Standardization in C++. CERN will be the first institution to see the proposal, in almost certain to be its final pre-approved Standardized form including supporting evidence of the usage experience, and performance data to help the future of scientific computation and research.

About the speaker

Michael Wong is the CEO of OpenMP. He is the IBM and Canadian representative to the C++ Standard and OpenMP Committee. He is also a Director of and a VP, Vice-Chair of Programming Languages for Canada's Standard Council. He has so many titles, it's a wonder he can get anything done.

He chairs the WG21 SG5 Transactional Memory, and is the co-author of a number C++11/OpenMP/Transactional Memory features including generalized attributes, user-defined literals, inheriting constructors, weakly ordered memory models, and explicit conversion operators. Having been the past C++ team lead to IBM's XL C++ compiler means he has been messing around with designing C++ compilers for twenty years. His current research interest, i.e. what he would like to do if he had time is in the area of parallel programming, transactional memory, C++ benchmark performance, object model, generic programming and template metaprogramming. He holds a B.Sc from University of Toronto, and a Masters in Mathematics from University of Waterloo.

He has been asked to speak at ACCU, C++Now, Meeting C++, ADC++, CASCON, Bloomberg, CERN, and many Universities, research centers and companies, except his own, where he has to listen.

Now he and his wife loves to teach their two children to be curious about everything.

Organised by: Axel Naumann, PH Department and Miguel Angel Marquina
Computing Seminars /IT Department

more information