首页> 外文期刊>International journal of parallel programming >Queue-Based and Adaptive Lock Algorithms for Scalable Resource Allocation on Shared-Memory Multiprocessors
【24h】

Queue-Based and Adaptive Lock Algorithms for Scalable Resource Allocation on Shared-Memory Multiprocessors

机译:基于队列的自适应锁定算法,用于共享内存多处理器上的可伸缩资源分配

获取原文
获取原文并翻译 | 示例

摘要

We present a scalable lock algorithm and an adaptive scheme for shared-memory multiprocessors addressing the resource allocation problem, which is also known as the h-out-of-k mutual exclusion problem. In this problem, threads compete for k shared resources where a thread may request an arbitrary number 1 ≤ h ≤ k of resources at the same time. The challenge is for each thread to acquire exclusive access to desired resources while preventing deadlock or starvation. Many existing approaches solve this problem in a distributed system, but the explicit message passing paradigm they adopt is not optimal for shared-memory. Other applicable methods, like two-phase locking and resource hierarchy, suffer from performance degradation under heavy contention, while lacking a desirable fairness guarantee. This work describes the first multi-resource lock algorithm that guarantees the strongest first-in, first-out fairness. Our methodology is based on a non-blocking queue where competing threads spin on previous conflicting resource requests. In our experimental evaluation we compared the overhead and scalability of our lock to the best available alternative approaches using a micro-benchmark. As contention increases, our multi-resource lock obtains an average of eight times speed-up over the alternatives including GNU C++'s lock method, Boost's lock function, and Intel TBB's queue mutex. To further improve the performance on low levels of contention, we introduce an adaptive scheme that is composed of two different lock algorithms and alternates the use the locks depending on the level of contention. Our experimental results show that the composite adaptive scheme achieves the best overall performance comparing with using either lock alone when system contention is not known a priori.
机译:针对共享资源多处理器,我们提出了一种可伸缩的锁定算法和一种自适应方案,以解决资源分配问题,这也被称为h-out-of-k互斥问题。在此问题中,线程竞争k个共享资源,其中一个线程可能同时请求1≤h≤k的任意数量的资源。挑战在于,每个线程都必须获得对所需资源的独占访问权限,同时又要防止死锁或饥饿。许多现有方法在分布式系统中解决了此问题,但是它们采用的显式消息传递范例对于共享内存并不是最佳的。其他适用的方法,例如两阶段锁定和资源层次结构,在竞争激烈的情况下会遭受性能下降的困扰,同时缺乏理想的公平性保证。这项工作描述了第一个多资源锁定算法,该算法可确保最强的先进先出公平性。我们的方法基于非阻塞队列,在该队列中,竞争线程根据先前冲突的资源请求旋转。在我们的实验评估中,我们将锁的开销和可扩展性与使用微基准测试的最佳可用替代方法进行了比较。随着争用的增加,我们的多资源锁的平均速度是GNU C ++的锁方法,Boost的锁函数和英特尔TBB的队列互斥锁等替代品的八倍。为了进一步提高低竞争级别的性能,我们引入了一种自适应方案,该方案由两种不同的锁算法组成,并根据竞争级别交替使用锁。我们的实验结果表明,与在系统争用未知的情况下单独使用任一锁相比,复合自适应方案可获得最佳的总体性能。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号