E. César et al. (Eds.): Euro-Par 2008 Workshops, LNCS 5415, pp. 152–162, 2009.
© Springer-Verlag Berlin Heidelberg 2009
Adaptive Read Validation in Time-Based Software
Transactional Memory
Ehsan Atoofian, Amirali Baniasadi, and Yvonne Coady
University of Victoria
3800 Finnerty Road, Victoria BC V8P 5C2, Canada
{eatoofian,amirali}@ece.uvic.ca, ycoady@cs.uvic.ca
Abstract. In software transactional memory (STM) systems, read validation en-
sures that a transaction always has a consistent view of the memory. Existing
read validation policies follow a static approach and use one policy across all
applications. However, no single universal read validation policy offers optimal
performance across all applications. We propose adaptive read validation
(ARV) for time-based STMs and adjust read validation policy according to
workloads’ behavior. ARV not only varies read validation policy across appli-
cations, but also tunes read validation policy across different phases of a trans-
action. The adaptive nature of our suggested technique improves performance
significantly for the set of workloads studied in this work.
Keywords: transactional memory, read validation policy, time-based transac-
tional memory.
1 Introduction
Chip multiprocessors (CMPs) are becoming mainstream computing, making concur-
rent programming necessary to utilize available cores in CMPs. Traditionally, pro-
grammers use locks to develop parallel applications and to protect program critical
sections from concurrent thread accesses. Coarse grained locks simplify program-
ming; however, they are not scalable and work poorly when the number of threads
increases. On the other hand, although fine-grained locks are scalable, they are com-
plicated and error-prone. Priority inversion, deadlock, and other synchronization bugs
make the lock-based programming too difficult for programmers, preventing develop-
ers from composing scalable applications out of existing software components.
The alternative solution for parallel programming is transactional memory (TM).
Transactional memory alleviates problems associated with lock-based programming
and enables developers to compose scalable applications. A transaction is a finite
sequence of instructions that access memory and are executed by a thread. Each
transaction is atomic: it commits if all read and write operations are validated, or
aborts if it conflicts with any other transaction. The ability to abort and restart con-
flicting sections eliminates potential deadlocks and avoids dealing with the complex-
ity of fine-grain locks. In addition to atomicity, transactions are linearizable [1]: they
take effect in a one-at-a-time order. Linearizability allows transactions to run in isola-
tion and prevents other transactions to interfere during execution. The underlying