The Mimir Approach to Transactional Output
Tingzhe Zhou, Michael Spear · 2016
In order to use transactional memory (TM) in place of locks, it is necessary to design linguistic mechanisms that enable transactions to achieve the same outcomes as lock-based code. The mechanisms need not match their lock-based equivalents exactly, but must provide the same abilities “in spirit,” so that programmers can (perhaps with nontrivial code rewriting) achieve the same behaviors and guarantees from transactions as with locks. In this paper, we focus on the question of transactional output, and introduce the Mimir methodology. Mimir employs an observation about two-phase locking and language-level transactional semantics to enable deferred output operations that appear to execute in isolation with respect to all concurrent transactions, but without serializing those other transactions. The technique employs ephemeral privatization and retry-based condition synchronization in a manner that is invisible to concurrent transactions. Most significantly, Mimir avoids buffering of data in order to defer output, and is compatible with both software and hardware TM.