The transactional conflict problem arises in transactional systems whenever two or more concurrent transactions clash on a data item.
While the standard solution to such conflicts is to immediately abort one of the transactions, some practical systems consider the alternative of delaying conflict resolution for a short interval, which may allow one of the transactions to commit. The challenge in the transactional conflict problem is to choose the optimal length of this delay interval so as to minimize the overall running time penalty for the conflicting transactions. In this paper, we propose a family of optimal online algorithms for the transactional conflict problem.
Specifically, we consider variants of this problem which arise in different implementations of transactional systems, namely "requestor wins" and "requestor aborts" implementations: in the former, the recipient of a coherence request is aborted, whereas in the latter, it is the requestor which has to abort. Both strategies are implemented by real systems.
We show that the requestor aborts case can be reduced to a classic instance of the ski rental problem, while the requestor wins case leads to a new version of this classical problem, for which we derive optimal deterministic and randomized algorithms.
Moreover, we prove that, under a simplified adversarial model, our algorithms are constant-competitive with the offline optimum in terms of throughput.
We validate our algorithmic results empirically through a hardware simulation of hardware transactional memory (HTM), showing that our algorithms can lead to non-trivial performance improvements for classic concurrent data structures.
On the Cost of Concurrency in Hybrid Transactional Memory
现有技术的\emph{software transactional memory (STM)}实现通过小心地避免\emph{incremental validation}的开销(即,重新读取先前读取的数据项以避免不一致),同时仍然提供\emph{progressiveness}(仅允许由于\emph{data conflicts}而导致的事务中止)。硬件事务内存(HTM)实现承诺甚至更好的性能,但不能提供进度保证。因此,它们必须与STM组合,导致\emph{hybrid} TM(HyTM),其中硬件事务必须是\emph{instrumented}(即,访问元数据)以检测与软件事务的争用。我们发现,与渐进式STM不同,渐进式HyTM中的软件事务无法避免增量验证。事实上,即使硬件事务可以\emph{read}元数据\emph{non-speculatively},该结果也成立。然后,我们提出了\emph{opaque} HyTM算法,提供在硬件仪器方面最佳的\emph{progressiveness for a subset of transactions}。我们探讨这些算法的并发性与硬件仪器与软件验证权衡。我们对Intel和IBM POWER8 HTM的实验似乎表明:(i)\emph{cost of concurrency}在实践中也存在,(ii)重要的是实现HyTM,它为最大的事务…