一种高效的多核资源不经意算法
Efficient Resource Oblivious Algorithms for Multicores
摘要:
我们考虑设计一个多核计算环境的有效算法与全局共享内存和p个核心,每个有一个大小为M的高速缓存,并与数据组织在大小为B的块。我们描述了多核的“层次平衡并行(HBP)”多线程计算类。HBP计算类似于最近工作中考虑的分层分治算法,但具有一些额外的功能,即使在考虑由于错误共享导致的缓存未命中时也能保证良好的性能。我们的HBP算法大多来自已知的高速缓存不经意的算法具有高并行性,但我们采用了新的技术,减少假共享的影响。我们解决虚假共享成本(或者更一般地说,块未命中)的方法是确保任何可能被窃取的任务与其他任务共享O(1)块。我们使用一个缺口技术的计算,有大于O(1)块共享。我们还将在配套文件中分析的有限访问写入的属性,我们绑定的任务的执行堆栈上访问共享块的成本。我们提出了优先工作窃取(PWS)调度程序,我们建立,给定一个足够高的高速缓存,PWS确定性地调度几个高度并行的HBP算法,包括扫描,矩阵计算和FFT,与高速缓存未命中的顺序复杂性的限制,当占传统的高速缓存未命中和虚假共享。我们还提出了一个列表排序算法几乎最优的界限。PWS调度不使用缓存或块大小信息,并使用处理器的知识,仅在确定任务可能被窃取的可用位置的程度上,因此它调度资源遗忘。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。