Back to proposals-2013

Title: Transactional Memory for C++
Proposer: michael_wong
Type: Presentation
Duration: 90 minutes
Description: SG5 plans to bring forward a proposal for two types of transactions based on V1.1 of the Draft Transactional Memory for C++ that has been worked on for 4 years. https://sites.google.com/site/tmforcplusplus/ This proposal supports 2 types of transactions:


We further show different techniques for supporting various levels of safety annotation, from fully static compiled time checking to some levels of dynamic checking to ease the burden for programmers.
It is the intention of the group to bring forward a fully worded proposal for Bristol 2013 as a Technical Specification. Now some of you have wondered if it is too early for TM. Let me say that HW is coming, with Intel's recent Haswell announcement, and IBM's BG/Q, and previously Sun's Rock. SW TM support has been here for quite some time with Intel's STM support of the 1.0 Draft, and most recently GCC C++ 4.7's nearly full support of Draft 1.1.
And if you think it is still too early, let me say that one of Hans Boehm's discovery was that locks are 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. Transactional memory is one way to solve the problem. It also helps for fine-grained locking on irregular data structures, and read-mostly structures.
In this talk, we will present the proposal for Standardization in C++, including supporting evidence of the usage experience, and performance data.
Finally, if you are still wondering is transactional memory fast enough? There are many different software transactional memory systems with different performance characteristics, so there is probably going to be one that fits your needs.
TM is coming in many different forms (HW, SW, hybrid systems, lock elision), and for C++ to remain in a good place with the many other languages that already support TM, this is the right time to be prepared with a sound proposal.

Roger: Yes - he's one of the experts