The size of a data structure (i.e., the number of elements in it) is a widely used property of a data set. However, for concurrent programs, obtaining a correct size efficiently is non-trivial. In fact, the literature does not offer a mechanism to obtain a correct (linearizable) size of a concurrent data set without resorting to inefficient solutions, such as taking a full snapshot of the data structure to count the elements, or acquiring one global lock in all update and size operations. This paper presents a methodology for adding a concurrent linearizable size operation to sets and dictionaries with a relatively low performance overhead. Theoretically, the proposed size operation is wait-free with asymptotic complexity linear in the number of threads (independently of data-structure size). Practically, we evaluated the performance overhead by adding size to various concurrent data structures in Java$-$a skip list, a hash table and a tree. The proposed linearizable size operation executes faster by orders of magnitude compared to the existing option of taking a snapshot, while incurring a throughput loss of $1\%-20\%$ on the original data structure's operations.


翻译:数据结构的大小(即其中元素的数量)是一组数据集广泛使用的属性。然而,对于同时运行的程序来说,取得正确大小是非三维的。事实上,文献并没有提供一种机制,以便在不采用效率不高的解决办法的情况下,获得一个同时运行的数据集的正确(线性)大小,例如对数据结构进行全面截图以计算元素,或者在所有更新和规模操作中获得一个全球锁定。本文件提出了一个方法,用于在功能管理相对较低的数据集和词典中添加一个同时可线性大小操作。理论上,拟议的尺寸操作在线条数量上(独立于数据结构大小)没有等待,而没有等待不那么复杂的线条数。实际上,我们通过将Java$-$ 跳出列表、 hash表和树中的各种并行数据结构的大小加起来,来评估性能管理。提议的可线性大小操作比现有的快速度选项更快地按数量顺序执行,同时在原始数据结构操作上造成负负值损失1 ⁇ -20 $。

0
下载
关闭预览

相关内容

【干货书】机器学习速查手册,135页pdf
专知会员服务
127+阅读 · 2020年11月20日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
105+阅读 · 2019年10月9日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
【推荐】用Tensorflow理解LSTM
机器学习研究会
36+阅读 · 2017年9月11日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Arxiv
0+阅读 · 2022年10月23日
Memory-Gated Recurrent Networks
Arxiv
12+阅读 · 2020年12月24日
On Feature Normalization and Data Augmentation
Arxiv
15+阅读 · 2020年2月25日
VIP会员
相关VIP内容
【干货书】机器学习速查手册,135页pdf
专知会员服务
127+阅读 · 2020年11月20日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
105+阅读 · 2019年10月9日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
【推荐】用Tensorflow理解LSTM
机器学习研究会
36+阅读 · 2017年9月11日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
相关论文
Arxiv
0+阅读 · 2022年10月23日
Memory-Gated Recurrent Networks
Arxiv
12+阅读 · 2020年12月24日
On Feature Normalization and Data Augmentation
Arxiv
15+阅读 · 2020年2月25日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员