Inevitability Mechanisms for Software Transactional Memory

Michael Spear, Maged M. Michael, Michael Lee Scott · 2008

Transactional Memory simplifies parallel programming by eliminating the use of locks to protect concurrent accesses to shared memory. However, when locks are used to provide mutual exclusion for irreversible operations (I/O, syscalls, calls to “black box” libraries), their replacement with transactions seems problematic: transactions can abort and restart at any arbitrary point in their execution, which is unacceptable when operations performed during a transaction have made the intermediate state of that transaction visible to an outside agent. Permitting at most one transaction to operate in an “inevitable” mode, where it is guaranteed to commit, is widely accepted as a solution to the irreversibility problem for transactions, albeit one that is not expected to scale. In this paper we explore a variety of mechanisms to support inevitability in software transactional memory. We demonstrate that it is possible for an inevitable transaction to run in parallel with (non-conflicting) non-inevitable transactions, without introducing significant overhead in the non-inevitable case. Our mechanisms can also be used to improve the speed of certain common-case transactions.

Read the paper · More papers on PaperTik