Skip to main content
QUICK REVIEW

[论文解读] Efficient means of Achieving Composability using Transactional Memory

Sathya Peri, Ajay Singh|arXiv (Cornell University)|Sep 3, 2017
Distributed systems and fault tolerance被引用 3
一句话总结

本文提出 HT-OSTM,一种基于哈希表与懒惰跳表的基于对象的软件事务内存(OSTM)系统,以实现高效、可组合的并发操作。通过利用操作中的高层语义信息,并通过时间戳排序强制执行冲突透明性,HT-OSTM 在查找与更新工作负载下,吞吐量比 ESTM 高出 106,比 RWSTM 高出 3–3.4%,展示了在并发数据结构中高效可组合性的优势。

ABSTRACT

The major focus of software transaction memory systems (STMs) has been to facilitate the multiprocessor programming and provide parallel programmers with an abstraction for fast development of the concurrent and parallel applications. Thus, STMs allow the parallel programmers to focus on the logic of parallel programs rather than worrying about synchronization. Heart of such applications is the underlying concurrent data-structure. The design of the underlying concurrent data-structure is the deciding factor whether the software application would be efficient, scalable and composable. However, achieving composition in concurrent data structures such that they are efficient as well as easy to program poses many consistency and design challenges. We say a concurrent data structure compose when multiple operations from same or different object instances of the concurrent data structure can be glued together such that the new operation also behaves atomically. For example, assume we have a linked-list as the concurrent data structure with lookup, insert and delete as the atomic operations. Now, we want to implement the new move operation, which would delete a node from one position of the list and would insert into the another or same list. Such a move operation may not be atomic(transactional) as it may result in an execution where another process may access the inconsistent state of the linked-list where the node is deleted but not yet inserted into the list. Thus, this inability of composition in the concurrent data structures may hinder their practical use. In this context, the property of compositionality provided by the transactions in STMs can be handy. STMs provide easy to program and compose transactional interface which can be used to develop concurrent data structures thus the parallel software applications. However, whether this can be achieved efficiently is a question we would try to answer in this thesis. Most of the STMs proposed in the literature are based on read/write primitive operations(or methods) on memory buffers and hence denoted RWSTMs. These lower level read/write primitive operations do not provide any other useful information except that a write operation always needs to be ordered with any other read or write. Thus limiting the number of possible concurrent executions. In this thesis, we consider Object-based STMs or OSTMs which operate on higher level objects rather than read/write operations on memory locations. The main advantage of considering OSTMs is that with the greater semantic information provided by the methods of the object, the conflicts among the transactions can be reduced and as a result, the number of aborts will also be less. This allows for larger number of permissive concurrent executions leading to more concurrency. Hence, OSTMs could be an efficient means of achieving composability of higher-level operations in the software applications using the concurrent data structures. This would allow parallel programmers to leverage underlying multi-core architecture. To design the OSTM, we have adopted the transactional tree model developed for databases. We extend the traditional notion of conflicts and legality to higher level operations in STMs which allows efficient composability. Using these notions we define the standard STM correctness notion of Conflict-Opacity. The OSTM model can be easily extended to implement concurrent lists, sets, queues or other concurrent data structures. We use the proposed theoretical OSTM model to design HT-OSTM - an OSTM with underlying hash table object. We noticed that major concurrency hot-spot is the chaining data structure within the hash table. So, we have used Lazyskip-list approach which is time efficient compared to normal lists in terms of traversal overhead. At the transactional level, we use timestamp ordering protocol to ensure that the executions are conflict-opaque. We provide a detailed handcrafted proof of correctness starting from operational level to the transactional level. At the operational level we show that HT-OSTM generates legal sequential history. At vi transactional level we show that every such sequential history would be opaque thus co-opaque. The HT-OSTM exports STM insert, STM lookup and STM delete methods to the programmer along-with STM begin and STM trycommit. Using these higher level operations user may easily and efficiently program any parallel software application involving concurrent hash table. To demonstrate the efficiency of composition we build a test application which executes the number of hash-tab methods (generated with a given probability) atomically in a transaction. Finally, we evaluate HT-OSTM against ESTM based hash table of synchrobench and the hash-table designed for RWSTM based on basic time stamp ordering protocol. We observe that HT-OSTM outperforms ESTM by the average magnitude of 106 transactions per second(throughput) for both lookup intensive and update intensive work load. HT-OSTM outperforms RWSTM by 3% & 3.4% update intensive and lookup intensive workload respectively

研究动机与目标

  • 为解决并发数据结构中可组合性挑战,即复杂操作(如 move)因中间状态不一致而无法原子化的问题。
  • 通过使用基于对象的 STM(OSTM)而非底层读/写操作,提高并发性并减少事务回滚。
  • 设计一种高性能、可组合的 STM 系统,支持高效实现具有复杂操作的并发哈希表。
  • 证明操作中的高层语义信息可实现更宽松的并发控制并提升可扩展性。
  • 在真实工作负载下,评估所提出的 HT-OSTM 模型与现有 STM 基线的性能表现。

提出的方法

  • 采用数据库中的事务树模型,将冲突与合法性概念扩展至 STM 中的高层操作。
  • 将冲突透明性定义为正确性准则,以确保事务执行等价于某种串行执行。
  • 设计 HT-OSTM 为基于哈希表后端的 OSTM,采用懒惰跳表以减少链式结构中的遍历开销。
  • 在事务级别使用时间戳排序协议,以强制执行冲突透明性并确保可串行化。
  • 从操作级别(合法的串行历史)到事务级别(透明历史)提供形式化、手工构造的正确性证明。
  • 暴露高层 STM 原原子——STM begin、STM insert、STM lookup、STM delete 和 STM trycommit——以方便程序员使用。

实验结果

研究问题

  • RQ1基于对象的 STMs 是否能通过利用操作中的语义信息,减少事务回滚并提高并发性?
  • RQ2如何通过 STMs 高效实现并发数据结构中复杂操作(如 move)的可组合性?
  • RQ3与传统的 RWSTM 方法相比,STMs 中使用高层操作在性能上能提升多少?
  • RQ4基于哈希表的 OSTM 配合懒惰跳表是否能实现比现有 STM 基线更高的吞吐量?
  • RQ5HT-OSTM 模型是否在支持高性能、可组合并发操作的同时保持正确性?

主要发现

  • HT-OSTM 在查找密集型与更新密集型工作负载下,吞吐量均比 ESTM 高出 106 笔事务/秒。
  • 在更新密集型工作负载下,HT-OSTM 比基于 RWSTM 的哈希表高出 3%;在查找密集型工作负载下,高出 3.4%。
  • 使用具有语义感知能力的基于对象的操作显著减少了冲突与回滚,实现了更宽松的并发控制。
  • 懒惰跳表数据结构有效降低了哈希表链式结构中的遍历开销,从而提升了性能。
  • 形式化正确性证明表明,HT-OSTM 生成了合法的串行历史,并在事务级别保持了冲突透明性。
  • 该系统通过原子事务实现了复杂操作(如 move)的高效、可组合编程,解决了并发数据结构设计中的一个关键挑战。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。