可变锁:结合自旋锁与睡眠锁的优点
Mutable Locks: Combining the Best of Spin and Sleep Locks
AI总结:
本文提出可变锁,一种兼具自旋锁响应性与睡眠锁低CPU消耗的自调优同步机制,无需程序员干预即可在多核并发应用中动态优化性能与资源使用。
摘要:
在本文中,我们提出了可变锁(Mutable Locks),这是一种同步构造,具有与传统锁(如自旋锁或睡眠锁)相同的执行语义,但在访问刚释放的临界区时的响应性与线程等待阶段期间的CPU时间使用之间实现了自调优的优化权衡。它满足了多核机器时代对现代同步支持的需求,其运行时行为应在多个维度(性能与资源消耗)上进行优化,而无需应用程序编程人员的干预。我们的方案旨在用于通用并发应用程序,在这些应用程序中,对底层软件/硬件栈和实际工作负载知之甚少或一无所知,这是一个对自旋与睡眠之间的静态选择不利的场景,而可变锁凭借其混合等待阶段和自调优能力恰好能够应对这一场景。
英文摘要:
In this article we present Mutable Locks, a synchronization construct with the same execution semantic of traditional locks (such as spin locks or sleep locks), but with a self-tuned optimized trade off between responsiveness---in the access to a just released critical section---and CPU-time usage during threads' wait phases. It tackles the need for modern synchronization supports, in the era of multi-core machines, whose runtime behavior should be optimized along multiple dimensions (performance vs resource consumption) with no intervention by the application programmer. Our proposal is intended for exploitation in generic concurrent applications where scarce or none knowledge is available about the underlying software/hardware stack and the actual workload, an adverse scenario for static choices between spinning and sleeping faced by mutable locks just thanks to their hybrid waiting phases and self-tuning capabilities.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。