Software transactional memory (STM) allows programmers to easily implement concurrent data structures. STMs simplify atomicity. Recent STMs can achieve good performance for some workloads but they have some limitations. In particular, STMs typically cannot support long-running reads which access a large number of addresses that are frequently updated. Multiversioning is a common approach used to support this type of workload. However, multiversioning is often expensive and can reduce the performance of transactions where versioning is not necessary. In this work we present Multiverse, a new STM that combines the best of both unversioned TM and multiversioning. Multiverse features versioned and unversioned transactions which can execute concurrently. A main goal of Multiverse is to ensure that unversioned transactions achieve performance comparable to the state of the art unversioned STM while still supporting fast versioned transactions needed to enable long running reads. We implement Multiverse and compare it against several STMs. Our experiments demonstrate that Multiverse achieves comparable or better performance for common case workloads where there are no long running reads. For workloads with long running reads and frequent updates Multiverse significantly outperforms existing STMS. In several cases for these workloads the throughput of Multiverse is several orders of magnitude faster than other STMs.
翻译:软件事务内存(STM)允许程序员轻松实现并发数据结构。STM简化了原子性保证。近期的STM在某些工作负载下已能实现良好性能,但仍存在若干局限。具体而言,STM通常无法支持访问大量频繁更新地址的长时间运行读操作。多版本化是支持此类工作负载的常用方法,但该方法通常开销较大,且可能降低无需版本化的事务性能。本文提出Multiverse——一种融合无版本化事务内存与多版本化优势的新型STM。Multiverse支持版本化与无版本化事务的并发执行,其核心设计目标是确保无版本化事务达到当前最优无版本化STM的性能水平,同时仍能支持实现长时间运行读操作所需的快速版本化事务。我们实现了Multiverse并与多种STM进行对比实验。结果表明,在无长时间运行读的常规工作负载下,Multiverse实现了相当或更优的性能;而在包含长时间运行读与频繁更新的工作负载下,Multiverse显著优于现有STM系统。对于后一类工作负载,Multiverse的吞吐量在多个案例中比其他STM快数个数量级。