arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2511.09194cs.DC
收藏

使用Combine-and-Exchange锁最小化关键路径

Minimize Your Critical Path with Combine-and-Exchange Locks

University of Stuttgart(斯图加特大学)

Simon König, Lukas Epple, Christian Becker

AI总结:

针对用户空间调度任务(如协程)的同步延迟问题,提出Combine-and-Exchange调度(CES)方法,确保竞争临界区在同一线程运行、并行工作均匀分布,在应用和微基准测试中分别实现3倍和8倍性能提升。

摘要:

协程正经历复兴,因为许多现代编程语言支持将协作式多任务处理用于高度并行或异步应用。其最大优势之一是并发和同步完全在用户空间管理,省去了重量级系统调用。然而,我们发现最先进的用户空间同步原语从内核级调度的角度处理用户空间中的同步,这在应用的关键路径上引入了不必要的延迟,限制了吞吐量。本文重新思考完全在用户空间调度的任务(如协程、纤程等)的同步问题,提出Combine-and-Exchange调度(CES)——一种新颖的调度方法,确保竞争的临界区在同一执行线程上运行,同时可并行工作均匀分布在其余线程。我们证明该方法可应用于多种现有语言和库,在应用基准测试中实现3倍性能提升,在微基准测试中实现8倍性能提升。

英文摘要:

Coroutines are experiencing a renaissance as many modern programming languages support the use of cooperative multitasking for highly parallel or asynchronous applications. One of the greatest advantages of this is that concurrency and synchronization is manged entirely in the userspace, omitting heavy-weight system calls. However, we find that state-of-the-art userspace synchronization primitives approach synchronization in the userspace from the perspective of kernel-level scheduling. This introduces unnecessary delays on the critical path of the application, limiting throughput. In this paper, we re-think synchronization for tasks that are scheduled entirely in the userspace (e.g., coroutines, fibers, etc.). We develop Combine-and-Exchange Scheduling (CES), a novel scheduling approach that ensures contended critical sections stay on the same thread of execution while parallelizable work is evenly spread across the remaining threads. We show that our approach can be applied to many existing languages and libraries, resulting in 3-fold performance improvements in application benchmarks as well as 8-fold performance improvements in microbenchmarks.

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

↑