We consider the problem of devising external memory algorithms whose memory allocations can change dynamically and unpredictably at run-time. The investigation of \memory-adaptive" algorithms, which are designed to adapt to dynamically changing memory allocations, can be considered a natural extension of the investigation of traditional, non-adaptive external memory algorithms. Our study is motivated by high performance database systems and operating systems in which applications are prioritized and internal memory is dynamically allocated in accordance with the priorities. In such situations, external memory applications are expected to perform as well as possible for the current memory allocation. The computation must be reorganized to adapt to the sequence of memory allocations in an online manner. In this paper we present a simple and natural dynamic memory allocation model. We de ne memory-adaptive external memory algorithms and specify what is needed for them to be dynamically optimal. Using novel techniques, we design and analyze dynamically optimal memory-adaptive algorithms for the problems of sorting, permuting, FFT, permutation networks, (standard) matrix multiplication and LU decomposition. We also present a dynamically optimal (in an amortized sense) memory-adaptive version of the bu er tree, a generic external memory data structure for a large number of batched dynamic applications. We show that a previously devised approach to memory-adaptive external mergesort is provably nonoptimal because of fundamental drawbacks. The lower bound proof techniques for sorting and matrix multiplication are fundamentally distinct techniques, and they are invoked by most other external memory lower bounds; hence we anticipate that the techniques presented here will apply to many external memory problems. 2
[1]
Donald E. Knuth,et al.
fundamental algorithms
,
1969
.
[2]
Donald E. Knuth,et al.
Sorting and Searching
,
1973
.
[3]
H. T. Kung,et al.
I/O complexity: The red-blue pebble game
,
1981,
STOC '81.
[4]
Alok Aggarwal,et al.
The input/output complexity of sorting and related problems
,
1988,
CACM.
[5]
Lars Arge,et al.
A General Lower Bound on the I/O-Complexity of Comparison-based Algorithms
,
1992
.
[6]
David S. Greenberg,et al.
Beyond core: Making parallel computer I/O practical
,
1993
.
[7]
Lars Arge,et al.
A General Lower Bound on the I/O-Complexity of Comparison-based Algorithms
,
1992,
WADS.
[8]
Edward F. Grove,et al.
External-memory graph algorithms
,
1995,
SODA '95.
[9]
Lars Arge,et al.
The Buuer Tree: a New Technique for Optimal I/o-algorithms ?
,
1995
.
[10]
Lars Arge,et al.
Efficient External-Memory Data Structures and Applications
,
1996,
BRICS Dissertation Series.
[11]
Jeffrey Scott Vitter,et al.
I/O-e cient scienti c computation using TPIE
,
1996
.
[12]
Per-Åke Larson,et al.
Dynamic Memory Adjustment for External Mergesort
,
1997,
VLDB.
[13]
Gerth Stølting Brodal,et al.
Worst-Case External-Memory Priority Queues
,
1998,
SWAT.
[14]
Jeffrey Scott Vitter,et al.
External memory algorithms
,
1998,
ESA.
[15]
E cient Bulk Operations on Dynamic R-trees
,
1999
.