A theoretical framework for memory-adaptive algorithms

External memory algorithms play a key role in database management systems and large scale processing systems. External memory algorithms are typically tuned for efficient performance given a fixed, statically allocated amount of internal memory. However, with the advent of real-time database system and database systems based upon administratively defined goals, algorithms must increasingly be able to adapt in an online manner when the amount of internal memory allocated to them changes dynamically and unpredictably. We present a theoretical and applicable framework for memory-adaptive algorithms (or simply MA algorithms). We define the competitive worst-case notion of what it means for an MA algorithm to be dynamically optimal and prove fundamental lower bounds on the performance of MA algorithms for problems such as sorting, standard matrix multiplication, and several related problems. Our main tool for proving dynamic optimality is the notion of resource consumption, which measures how efficiently an MA algorithm adapts itself to memory fluctuations. We present the first dynamically optimal algorithm for sorting (based upon mergesort), permuting, FFT, permutation networks, buffer trees, (standard) matrix multiplication, and LU decomposition. In each case, dynamic optimality is demonstrated via a potential function argument showing that the algorithm's resource consumption is within a constant factor of optimal.

[1]  Donald E. Knuth,et al.  The art of computer programming, volume 3: (2nd ed.) sorting and searching , 1998 .

[2]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[3]  M. Luby,et al.  On ~ competitive algorithms for paging problems , 1991 .

[4]  M. Livny,et al.  Partially Preemptive Hash Joins , 1993, SIGMOD Conference.

[5]  Rakesh D. Barve,et al.  External Memory Algorithms with Dynamically Changing Memory Allocations . , 1998 .

[6]  Per-Åke Larson,et al.  Dynamic Memory Adjustment for External Mergesort , 1997, VLDB.

[7]  Lars Arge,et al.  The Buuer Tree: a New Technique for Optimal I/o-algorithms ? , 1995 .

[8]  Miron Livny,et al.  Managing Memory to Meet Multiclass Workload Response Time Goals , 1993, VLDB.

[9]  Miron Livny,et al.  Memory-Adaptive External Sorting , 1993, VLDB.

[10]  Robert E. Tarjan,et al.  Amortized efficiency of list update and paging rules , 1985, CACM.

[11]  Jeffrey Scott Vitter,et al.  External memory algorithms and data structures , 1999, External Memory Algorithms.

[12]  Alok Aggarwal,et al.  The input/output complexity of sorting and related problems , 1988, CACM.

[13]  Amos Fiat,et al.  Competitive Paging Algorithms , 1991, J. Algorithms.

[14]  H. T. Kung,et al.  I/O complexity: The red-blue pebble game , 1981, STOC '81.

[15]  Donald E. Knuth,et al.  The Art of Computer Programming, Volume I: Fundamental Algorithms, 2nd Edition , 1997 .

[16]  Hansjörg Zeller,et al.  An Adaptive Hash Join Algorithm for Multiuser Environments , 1990, VLDB.