摘要:
Concurrent data structures are widely used in modern multi-core architectures, providing atomic- ity (linearizability) for each concurrent operation. However, it is often desirable to execute several operations on multiple data structures atomically. This requirement cannot be easily supported by concurrent data structures, and requires the use of a locking mechanism or some sort of transac- tional framework. We present a design of such a transactional framework supporting linearizable transactions of multiple operations on multiple data structures in a lock-free manner. Our design is comprised of concurrent lock-free data structures supporting a transactional API, and a transac- tion engine responsible for executing operations as an atomic transaction. We employ a helping mechanism to obtain lock-freedom, and an advanced lock-free contention management mechanism to mitigate the effects of aborting transactions. When cyclic helping conflicts are detected, the contention manager reorders the conflicting transactions execution allowing all transactions to com- plete with minimal delay. Our design supports operation dependencies, i. e., results of operations can affect the inputs of subsequent operations or their control flow. To exemplify this framework we implement a transactional set using a skip-list, a transactional queue, and a transactional register. We present an evaluation of the system showing that we outperform general software transactional memory, and are competitive with lock-based transactional data structures, while providing an ad- ditional (lock-free) progress guarantee.