We study the problem of constructing concurrent objects in a setting where $P$ processes run in parallel and interact through a shared memory that is subject to write contention. Our goal is to transform hardware primitives that are subject to write contention into ones that handle contention gracefully. We give contention-resolution algorithms for several basic primitives, and analyze them under a relaxed, roughly-synchronous stochastic scheduler, where processes run at roughly the same rate up to a constant factor with high probability. Specifically, we construct read/write registers and CAS registers that have latency $O(\log P)$ w.h.p. under our scheduler model, using $O(1)$ hardware read/write registers and, in the case of our CAS construction, one hardware CAS register. Our algorithms guarantee performance even when their operations are invoked by an adaptive adversary that is able to see the entire history of operations so far, including their timing and return values. This allows them to be used as building blocks inside larger programs; using this compositionality property, we obtain several other constructions (LL/SC, fetch-and-increment, bounded max registers, and counters). To complement our constructions, we give a trade-off showing that even under a perfectly synchronous schedule and even if each process only executes one operation, any algorithm that implements any of the primitives that we consider, uses space $M$, and has latency at most $L$ with high probability must have expected latency at least $Ω(\log_{ML} P)$.


翻译:我们研究在 $P$ 个进程并行运行并通过存在写竞争的共享内存进行交互的环境中构建并发对象的问题。我们的目标是将受写竞争影响的硬件原语转化为能优雅处理竞争的原语。我们针对几种基本原语给出了竞争解决算法,并在一种松弛的、近似同步的随机调度器下进行分析,在该调度器下,进程以大致相同的速率运行(相差常数因子以内)且具有高概率。具体而言,我们构建了读/写寄存器和CAS寄存器,在我们的调度器模型下,其延迟以高概率为 $O(\log P)$,且仅使用 $O(1)$ 个硬件读/写寄存器,而在我们的CAS构造中,还使用了一个硬件CAS寄存器。即使这些操作被一个能够看到迄今为止操作全部历史(包括其时序和返回值)的自适应对手所调用,我们的算法也能保证性能。这使得它们能够用作更大程序内部的构建模块;利用这种组合性质,我们获得了其他几种构造(LL/SC、取并递增、有界最大寄存器和计数器)。为补充我们的构造,我们给出一个权衡:即使在完全同步的调度下,并且即使每个进程仅执行一个操作,任何实现我们所考虑的任意原语的算法,若使用空间 $M$ 且延迟以高概率至多为 $L$,则其期望延迟至少为 $Ω(\log_{ML} P)$。

0
下载
关闭预览

相关内容

【2023新书】并行算法,Parallel Algorithms ,400页pdf
专知会员服务
72+阅读 · 2023年8月6日
【2023新书】并发、并行和分布式计算,260页pdf
专知会员服务
72+阅读 · 2023年6月3日
专知会员服务
55+阅读 · 2021年7月21日
Fast-OCNet: 更快更好的OCNet.
极市平台
21+阅读 · 2019年2月10日
React Native 分包哪家强?看这文就够了!
程序人生
13+阅读 · 2019年1月16日
一文读懂目标检测:R-CNN、Fast R-CNN、Faster R-CNN、YOLO、SSD
七月在线实验室
11+阅读 · 2018年7月18日
YesOfCourse团队在Kaggle文本匹配竞赛中获得优异成绩
中国科学院网络数据重点实验室
10+阅读 · 2017年6月15日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
VIP会员
最新内容
战力倍增器:自主武器系统与乌克兰及加沙冲突
人工智能赋能战场情报:提速决策进程
专知会员服务
2+阅读 · 7月17日
《拥抱新兴技术:面向未来军官的教育革新》
专知会员服务
5+阅读 · 7月17日
《无人地面战车(UGV)的崛起》报告
专知会员服务
7+阅读 · 7月16日
相关资讯
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员