Enhancing the performance and usability of software transactional memory
Authors: Michael L. Scott
Venue:  (2008)

The computing industry is at the brink of a &ldquo;concurrency revolution&rdquo;. Mainstream microprocessor vendors have started manufacturing multicore chips. Low end desktops and laptops are already turning into parallel machines. Soon, every programmer will have to write parallel programs to leverage the processing horsepower of multicore chips. However, parallel programming is known to be hard; at the current state-of-the-art, it is effectively limited to (rare) experts. One of the key challenges in parallel programming is correct data sharing among concurrent computations. The traditional solution of lock-based mutual exclusion is known to have several significant drawbacks, such as deadlock, lack of composability, intolerance to arbitrary delays, etc. Transactional Memory (TM) is a new technology that promises to alleviate these problems, significantly simplifying parallel programming. One of the key properties of early software runtimes for TM (STMs) was that they were nonblocking, i.e. arbitrary delays in some transactions in the system would not interfere with forward progress of other transactions. Nonblocking STMs avoid some severe problems such as delays due to preemption, priority inversion, and thread faults. However, early attempts incurred significant runtime overheads, making then largely impractical. In this dissertation, we improve nonblocking STMs in several ways, making them progressively more efficient and competitive with state-of-the-art blocking STMs. Specifically, we present two nonblocking STMs, the Adaptive STM (ASTM) and the Rochester STM (RSTM) that reduce the levels of indirection required to access transactional data. We also evaluate the impact of other design choices such as ownership acquisition and release techniques, obstruction free vs. lock free progress, visible vs. invisible reads, etc. on performance of these STMs. We thereafter present the Marathe and Moir STM (MM-STM), which further improves performance of nonblocking STMs by incorporating significant optimizations such as timestamp based validation, store based ownership release, and undo logs, all of which appear in recent blocking STMs. Various forms of lock-based atomicity are considered to be an appealing semantics for STM transactions. These semantics permit the so called publication programming idiom, where a transaction takes an action that makes some formerly thread private data accessible to concurrent threads in the system. They also permit the privatization programming idiom, where a transaction takes an action that effectively makes some formerly shared data private to a single thread in the system. However, in most practical STMs, both privatization and publication lead to nontrivial races between transactional and nontransactional accesses to data that may be privatized or publicized respectively. Efficiently ensuring lock-based semantics in STMs is a nontrivial problem. We present a novel technique in STM runtimes, based on a new notion of partially visible reads, that enforces lock-based semantics. We show that this technique scales well on a wide range of microbenchmarks.