Transactional data structures support threads executing a sequence of operations atomically. Dynamic transactions allow operands to be generated on the y and allows threads to execute code in between the operations of a transaction, in contrast to static transactions which need to know the operands in advance. A framework called Lock-free Transactional Transformation (LFTT) allows data structures to run high-performance transactions, but it only supports static transactions. We present Dynamic Transactional Transformation, an extension to LFTT to add support for dynamic transactions and wait-free progress while retaining its speed. The thread-helping scheme of LFTT presents a unique challenge to dynamic transactions. We overcome this challenge by changing the input of LFTT from a list of operations to a function, forcing helping threads to always start at the beginning of the transaction, and allowing threads to skip completed operations through the use of a list of return values. We thoroughly evaluate the performance impact of support for dynamic transactions and wait-free progress and nd that these features do not hurt the performance of LFTT for our test cases.
LaBorde et alThe straightforward way to implement a transactional data structure from a sequential container is to use software transactional memory (STM) 11 . An STM instruments memory accesses by recording the locations a thread reads in a read set, and the locations it writes in a write set.If the read/write sets of different transactions overlap, only one transaction is allowed to commit, the concurrent transactions are aborted and restarted. A drawback of STM is that the runtime system that keeps track of read/write sets and detects conflicts can have a detrimental impact on performance 12 .The inherent disadvantage of STM concurrency control is that low-level memory access conflicts do not necessarily correspond to high-level semantic conflicts. Consider a set implemented as an ordered linked list, where each node has two fields, an integer value and a pointer to the next node.The initial state of the set is {0, 3, 6, 9, 10}. Thread 1 and Thread 2 intend to insert 4 and 1, respectively. Since these two operations commute, it is feasible to execute them concurrently 13 . Commutative data structure operations are those which have no dependencies on each other; reordering them yields the same abstract state of the container. Existing concurrent linked lists employing lock-free or fine-grained locking synchronizations allow concurrent execution of the two operations. Nevertheless, these operations have a read/write conflict and the STM has to abort one of them.An alternative approach called Lock-free Transactional Transformation (LFTT) 14 includes semantic conflict detection that uses information about the data structures and which operations are being executed, to prevent conflicting operations from unnecessarily causing transactions to abort.A significant advantage of using data structure transactions is that this semantic information is availabl...