Closing the Gap Between Cache-oblivious and Cache-adaptive Analysis

被引:4
|
作者
Bender, Michael A. [1 ]
Chowdhury, Rezaul A. [1 ]
Das, Rathish [1 ]
Johnson, Rob [2 ]
Kuszmaul, William [3 ]
Lincoln, Andrea [3 ]
Liu, Quanquan C. [3 ]
Lynch, Jayson [3 ]
Xu, Helen [3 ]
机构
[1] SUNY Stony Brook, Stony Brook, NY 11794 USA
[2] VMware Res, Palo Alto, CA USA
[3] MIT, CSAIL, 77 Massachusetts Ave, Cambridge, MA 02139 USA
来源
PROCEEDINGS OF THE 32ND ACM SYMPOSIUM ON PARALLELISM IN ALGORITHMS AND ARCHITECTURES (SPAA '20) | 2020年
关键词
Cache-adaptive algorithms; smoothed analysis; cache-oblivious algorithms; GAUSSIAN-ELIMINATION;
D O I
10.1145/3350755.3400274
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Cache-adaptive analysis was introduced to analyze the performance of an algorithm when the cache (or internal memory) available to the algorithm dynamically changes size. These memory-size fluctuations are, in fact, the common case in multi-core machines, where threads share cache and RAM. An algorithm is said to be efficiently cache-adaptive if it achieves optimal utilization of the dynamically changing cache. Cache-adaptive analysis was inspired by cache-oblivious analysis. Many (or even most) optimal cache-oblivious algorithms have an (a, b, c)-regular recursive structure. Such (a, b, c)-regular algorithms include Longest Common Subsequence, All Pairs Shortest Paths, Matrix Multiplication, Edit Distance, Gaussian Elimination Paradigm, etc. Bender et al. (2016) showed that some of these optimal cache-oblivious algorithms remain optimal even when cache changes size dynamically, but that in general they can be as much as logarithmic factor away from optimal. However, their analysis depends on constructing a highly structured, worst-case memory profile, or sequences of fluctuations in cache size. These worst-case profiles seem fragile, suggesting that the logarithmic gap may be an artifact of an unrealistically powerful adversary. We close the gap between cache-oblivious and cache-adaptive analysis by showing how to make a smoothed analysis of cache-adaptive algorithms via random reshuffling of memory fluctuations. Remarkably, we also show the limits of several natural forms of smoothing, including random perturbations of the cache size and randomizing the algorithm's starting time. Nonetheless, we show that if one takes an arbitrary profile and performs a random shuffle on when "significant events" occur within the profile, then the shuffled profile becomes optimally cache-adaptive in expectation, even when the initial profile is adversarially constructed. These results suggest that cache-obliviousness is a solid foundation for achieving cache-adaptivity when the memory profile is not overly tailored to the algorithm structure.
引用
收藏
页码:63 / 73
页数:11
相关论文
共 50 条
  • [1] Cache-aware and cache-oblivious adaptive sorting
    Brodal, GS
    Fagerberg, R
    Moruz, G
    AUTOMATA, LANGUAGES AND PROGRAMMING, PROCEEDINGS, 2005, 3580 : 576 - 588
  • [2] Cache-Oblivious Hashing
    Rasmus Pagh
    Zhewei Wei
    Ke Yi
    Qin Zhang
    Algorithmica, 2014, 69 : 864 - 883
  • [3] Cache-Oblivious Hashing
    Pagh, Rasmus
    Wei, Zhewei
    Yi, Ke
    Zhang, Qin
    PODS 2010: PROCEEDINGS OF THE TWENTY-NINTH ACM SIGMOD-SIGACT-SIGART SYMPOSIUM ON PRINCIPLES OF DATABASE SYSTEMS, 2010, : 297 - 304
  • [4] Cache-Oblivious Persistence
    Davoodi, Pooya
    Fineman, Jeremy T.
    Iacono, John
    Oezkan, Oezguer
    ALGORITHMS - ESA 2014, 2014, 8737 : 296 - 308
  • [5] Cache-oblivious algorithms
    Leiserson, CE
    ALGORITHMS AND COMPLEXITY, PROCEEDINGS, 2003, 2653 : 5 - 5
  • [6] Cache-Oblivious Algorithms
    Frigo, Matteo
    Leiserson, Charles E.
    Prokop, Harald
    Ramachandran, Sridhar
    ACM TRANSACTIONS ON ALGORITHMS, 2012, 8 (01)
  • [7] Cache-Oblivious Hashing
    Pagh, Rasmus
    Wei, Zhewei
    Yi, Ke
    Zhang, Qin
    ALGORITHMICA, 2014, 69 (04) : 864 - 883
  • [8] The Cost of Cache-Oblivious Searching
    Michael A. Bender
    Gerth Stølting Brodal
    Rolf Fagerberg
    Dongdong Ge
    Simai He
    Haodong Hu
    John Iacono
    Alejandro López-Ortiz
    Algorithmica, 2011, 61 : 463 - 505
  • [9] Is cache-oblivious DGEMM viable?
    Gunnels, John A.
    Gustavson, Fred G.
    Pingali, Keshav
    Yotov, Kamen
    APPLIED PARALLEL COMPUTING: STATE OF THE ART IN SCIENTIFIC COMPUTING, 2007, 4699 : 919 - +
  • [10] Cache-Oblivious String Dictionaries
    Brodal, Gerth Stolting
    Fagerberg, Rolf
    PROCEEDINGS OF THE SEVENTHEENTH ANNUAL ACM-SIAM SYMPOSIUM ON DISCRETE ALGORITHMS, 2006, : 581 - +