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通常无法支持访问大量频繁更新地址的长时读取操作。多版本化是支持此类工作负载的常见方法,但往往开销较高,且可能降低无需版本化的事务性能。本文提出Multiverse——一种融合无版本化事务内存与多版本化优势的新型STM。Multiverse支持版本化事务与非版本化事务并发执行,其主要目标是确保非版本化事务达到与最先进的无版本化STM相当的性能,同时保留支持长时读取所需的快速版本化事务能力。我们实现了Multiverse并与多种STM进行对比实验。结果表明:对于不存在长时读取的常规工作负载,Multiverse可实现相当或更优的性能;对于具有长时读取与频繁更新特点的工作负载,Multiverse显著优于现有STM,其吞吐量在多个测试案例中比其余STM快数个数量级。