STM in the Small: Trading Generality for Performance in Software Transactional Memory

Data structures implemented using software transactional memory (STM) have a reputation for being much slower than data structures implemented directly from low-level primitives such as atomic compare-and-swap (CAS). In this paper we present a specialized STM system (SpecTM) that allows the program to express additional knowledge about the particular operations being performed by transactions - e.g., using a separate API to write transactions that access small, fixed, numbers of memory locations. We show that data structures implemented using SpecTM offer essentially the same performance and scalability as implementations built directly from CAS. We present results using hash tables and skip lists on machines with up to 8 sockets and up to 128 hardware threads. Specialized transactions can be mixed with normal transactions, allowing fast-path operations to be specialized for greater performance, while allowing less common cases to be expressed using normal transactions for simplicity. We believe that SpecTM provides a “sweet spot” for expert programmers developing scalable data structures.

Published in:
Proceedings of the 6th ACM European conference on Computer systems, 1-14
Presented at:
6th ACM European conference on Computer systems, Bern, Switzerland, April 11-13, 2012

Note: The status of this file is: Anyone

 Record created 2012-02-14, last modified 2020-05-19

Publisher's version:
Download fulltext

Rate this document:

Rate this document:
(Not yet reviewed)