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

无锁数据结构的性能分析:一个基于锁的模型

Analyzing the Performance of Lock-Free Data Structures: A Conflict-based Model

Aras Atalar, Paul Renaud-Goud, Philippas Tsigas

摘要:

本文研究了无锁并发数据结构的建模和性能分析。无锁设计采用乐观冲突控制机制,允许多个进程同时访问共享数据对象。它们保证至少有一个并发操作在有限的步骤数内完成,而不管操作的状态如何。我们的分析认为,这种无锁的数据结构,可以表示为固定大小的重试循环的线性组合。我们的主要贡献是一种新的方式建模和分析一般类的无锁算法,实现预测的吞吐量接近我们在实践中观察到的。我们强调两种冲突,形状的性能:(i)硬件冲突,由于并发调用原子原语;(ii)逻辑冲突,所造成的同时操作的共享数据结构。我们展示了如何分别处理这些硬件和逻辑冲突,以及如何将它们结合起来,从而计算无锁算法的吞吐量。我们还提出了一个共同的框架,使无锁实现之间的公平比较,覆盖整个争用域,以及更好地了解性能影响因素。我们的分析的这一部分提供了一种计算好的回退策略的方法,以微调无锁算法的性能。我们的实验结果,一组广泛使用的并发数据结构和抽象的无锁设计的基础上,表明我们的分析密切关注实际的代码行为。

英文摘要:

This paper considers the modeling and the analysis of the performance of lock-free concurrent data structures. Lock-free designs employ an optimistic conflict control mechanism, allowing several processes to access the shared data object at the same time. They guarantee that at least one concurrent operation finishes in a finite number of its own steps regardless of the state of the operations. Our analysis considers such lock-free data structures that can be represented as linear combinations of fixed size retry loops. Our main contribution is a new way of modeling and analyzing a general class of lock-free algorithms, achieving predictions of throughput that are close to what we observe in practice. We emphasize two kinds of conflicts that shape the performance: (i) hardware conflicts, due to concurrent calls to atomic primitives; (ii) logical conflicts, caused by simultaneous operations on the shared data structure. We show how to deal with these hardware and logical conflicts separately, and how to combine them, so as to calculate the throughput of lock-free algorithms. We propose also a common framework that enables a fair comparison between lock-free implementations by covering the whole contention domain, together with a better understanding of the performance impacting factors. This part of our analysis comes with a method for calculating a good back-off strategy to finely tune the performance of a lock-free algorithm. Our experimental results, based on a set of widely used concurrent data structures and on abstract lock-free designs, show that our analysis follows closely the actual code behavior.

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

↑