Skip to main content
QUICK REVIEW

[论文解读] Efficient Resource Oblivious Algorithms for Multicores

Richard Cole, Vijaya Ramachandran|arXiv (Cornell University)|Mar 21, 2011
Parallel Computing and Optimization Techniques参考文献 19被引用 11
一句话总结

本文提出了一种面向多核处理器的资源无关调度器——优先级负载均衡(PWS),即使在存在虚假共享和块缺失的情况下,也能实现最优缓存性能。通过设计具有有界块共享的分层平衡并行(HBP)算法,并结合间隔填充与有限写访问技术,PWS确保了缓存缺失界限与顺序复杂度一致,且无需了解缓存或块大小信息。

ABSTRACT

We consider the design of efficient algorithms for a multicore computing environment with a global shared memory and p cores, each having a cache of size M, and with data organized in blocks of size B. We characterize the class of `Hierarchical Balanced Parallel (HBP)' multithreaded computations for multicores. HBP computations are similar to the hierarchical divide & conquer algorithms considered in recent work, but have some additional features that guarantee good performance even when accounting for the cache misses due to false sharing. Most of our HBP algorithms are derived from known cache-oblivious algorithms with high parallelism, however we incorporate new techniques that reduce the effect of false-sharing. Our approach to addressing false sharing costs (or more generally, block misses) is to ensure that any task that can be stolen shares O(1) blocks with other tasks. We use a gapping technique for computations that have larger than O(1) block sharing. We also incorporate the property of limited access writes analyzed in a companion paper, and we bound the cost of accessing shared blocks on the execution stacks of tasks. We present the Priority Work Stealing (PWS) scheduler, and we establish that, given a sufficiently `tall' cache, PWS deterministically schedules several highly parallel HBP algorithms, including those for scans, matrix computations and FFT, with cache misses bounded by the sequential complexity, when accounting for both traditional cache misses and for false sharing. We also present a list ranking algorithm with almost optimal bounds. PWS schedules without using cache or block size information, and uses knowledge of processors only to the extent of determining the available locations from which tasks may be stolen; thus it schedules resource-obliviously.

研究动机与目标

  • 设计高效、资源无关的多线程算法,用于多核系统,即使在缓存缺失和虚假共享情况下仍能保持良好性能。
  • 解决因跨核心共享内存访问导致的块缺失所引起的性能下降,特别是由虚假共享引起的问题。
  • 开发一种无需了解缓存大小、块大小或处理器数量的调度器,同时实现最优性能。
  • 将缓存无关算法设计扩展至包含并行性与共享内存竞争,特别是虚假共享。
  • 证明HBP算法即使在存在块缺失的情况下,也能通过调度实现与顺序复杂度相匹配的性能界限。

提出的方法

  • 将分层平衡并行(HBP)计算引入为一类具有结构特性的多线程算法,其特性可确保有界块共享。
  • 应用间隔填充技术,以减少具有超过O(1)块共享的计算中的块缺失开销。
  • 引入有限写访问语义,以限制任务执行期间共享块访问的成本。
  • 设计优先级负载均衡(PWS)调度器,以确定性方式调度HBP算法,且不依赖缓存或块大小信息。
  • 采用递归任务分解策略,展开至至少生成p个任务的第一级,以实现高效的缓存利用。
  • 将任务执行栈上访问共享块的成本进行绑定,以确保在共享内存竞争下性能的鲁棒性。

实验结果

研究问题

  • RQ1在存在虚假共享和块缺失的情况下,资源无关调度能否实现在多核系统中的最优缓存性能?
  • RQ2如何设计HBP算法以最小化块共享,从而减少由虚假共享引起的延迟?
  • RQ3何种调度器设计可实现在不了解缓存大小、块大小或处理器数量的前提下实现最优性能?
  • RQ4在存在共享内存竞争的并行执行下,已知的缓存无关算法性能是否仍可保持?
  • RQ5在算法设计中,何种结构性质可确保即使在任务被窃取且共享块被访问时,块缺失仍保持有界?

主要发现

  • PWS调度器即使在考虑虚假共享和块缺失的情况下,仍能实现与HBP算法顺序复杂度相匹配的缓存缺失界限。
  • HBP算法(包括扫描、矩阵乘法和FFT等)在PWS调度下被证明可实现最优性能。
  • 间隔填充技术有效降低了高块共享算法中的块缺失开销,提升了并行效率。
  • 使用有限写访问确保了共享块访问成本有界,且不会显著降低性能。
  • 该框架支持多级缓存层次结构,可在缓存被划分到不同核心时实现最优性能。
  • 该方法可在分层多核系统中实现共享缓存的最优利用,且调度器无需了解缓存参数。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。