arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1511.01779cs.DC
收藏

事务内存中的并发代价

On the Cost of Concurrency in Transactional Memory

Srivatsan Ravi

摘要:

传统的同步技术基于\emph{locking},它为线程提供对共享数据的独占访问。\emph{Coarse-grained}锁定通常会强制线程顺序访问大量数据,因此无法充分利用硬件并发性。另一方面,特定于程序的\emph{fine-grained}锁定或\emph{non-blocking}(\emph{i.e.},不使用锁)同步对大多数程序员来说是一种黑暗的艺术,只依赖于少数计算专家的智慧。因此,它是有吸引力的,以寻求这两个极端之间的中间地带:一个同步机制,减轻了程序员的开销的推理数据冲突,可能会出现并发操作,而不会严重限制程序的性能。\emph{Transactional Memory (TM)}的抽象提出了这样一种机制:它打算结合一个易于使用的编程接口,有效利用多核架构提供的并发计算能力。TM允许程序员\emph{speculatively}以具有\emph{all-or-nothing}语义的\emph{atomic transactions}形式执行共享内存操作序列:事务可以是\emph{commit}(在这种情况下,它看起来像是按顺序执行的),也可以是\emph{abort}(在这种情况下,它的更新操作不生效)。因此,程序员可以在设计软件时只考虑顺序语义,并让TM在运行时负责解决并发执行中的冲突。直观地说,我们希望TM允许尽可能多的\emph{concurrency}:在没有严重数据冲突的情况下,事务应该能够并行进行。但是,在TM中提供高度并发的内在成本是什么?这是本文的中心问题。

英文摘要:

Traditional techniques for synchronization are based on \emph{locking} that provides threads with exclusive access to shared data. \emph{Coarse-grained} locking typically forces threads to access large amounts of data sequentially and, thus, does not fully exploit hardware concurrency. Program-specific \emph{fine-grained} locking or \emph{non-blocking} (\emph{i.e.}, not using locks) synchronization, on the other hand, is a dark art to most programmers and trusted to the wisdom of a few computing experts. Thus, it is appealing to seek a middle ground between these two extremes: a synchronization mechanism that relieves the programmer of the overhead of reasoning about data conflicts that may arise from concurrent operations without severely limiting the program's performance. The \emph{Transactional Memory (TM)} abstraction is proposed as such a mechanism: it intends to combine an easy-to-use programming interface with an efficient utilization of the concurrent-computing abilities provided by multicore architectures. TM allows the programmer to \emph{speculatively} execute sequences of shared-memory operations as \emph{atomic transactions} with \emph{all-or-nothing} semantics: the transaction can either \emph{commit}, in which case it appears as executed sequentially, or \emph{abort}, in which case its update operations do not take effect. Thus, the programmer can design software having only sequential semantics in mind and let TM take care, at run-time, of resolving the conflicts in concurrent executions. Intuitively, we want TMs to allow for as much \emph{concurrency} as possible: in the absence of severe data conflicts, transactions should be able to progress in parallel. But what are the inherent costs associated with providing high degrees of concurrency in TMs? This is the central question of the thesis.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑