HOME

TheInfoList



OR:

In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
, external memory algorithms or out-of-core algorithms are
algorithms In mathematics and computer science, an algorithm () is a finite sequence of mathematically rigorous instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for per ...
that are designed to process data that are too large to fit into a computer's
main memory Computer data storage or digital data storage is a technology consisting of computer components and recording media that are used to retain digital data. It is a core function and fundamental component of computers. The central processin ...
at once. Such algorithms must be optimized to efficiently fetch and access data stored in slow bulk memory ( auxiliary memory) such as hard drives or tape drives, or when memory is on a
computer network A computer network is a collection of communicating computers and other devices, such as printers and smart phones. In order to communicate, the computers and devices must be connected by wired media like copper cables, optical fibers, or b ...
. External memory algorithms are analyzed in the external memory model.


Model

External memory algorithms are analyzed in an idealized
model of computation In computer science, and more specifically in computability theory and computational complexity theory, a model of computation is a model which describes how an output of a mathematical function is computed given an input. A model describes how ...
called the external memory model (or I/O model, or disk access model). The external memory model is an
abstract machine In computer science, an abstract machine is a theoretical model that allows for a detailed and precise analysis of how a computer system functions. It is similar to a mathematical function in that it receives inputs and produces outputs based on p ...
similar to the RAM machine model, but with a cache in addition to
main memory Computer data storage or digital data storage is a technology consisting of computer components and recording media that are used to retain digital data. It is a core function and fundamental component of computers. The central processin ...
. The model captures the fact that read and write operations are much faster in a cache than in
main memory Computer data storage or digital data storage is a technology consisting of computer components and recording media that are used to retain digital data. It is a core function and fundamental component of computers. The central processin ...
, and that
reading Reading is the process of taking in the sense or meaning of symbols, often specifically those of a written language, by means of Visual perception, sight or Somatosensory system, touch. For educators and researchers, reading is a multifacete ...
long contiguous blocks is faster than reading randomly using a
disk read-and-write head A disk read-and-write head is the small part of a disk drive that moves above the disk platter and transforms the platter's magnetic field into electric current (reads the disk) or, vice versa, transforms electric current into magnetic field ...
. The running time of an
algorithm In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
in the external memory model is defined by the number of reads and writes to memory required. The model was introduced by Alok Aggarwal and Jeffrey Vitter in 1988. The external memory model is related to the cache-oblivious model, but algorithms in the external memory model may know both the block size and the cache size. For this reason, the model is sometimes referred to as the cache-aware model. The model consists of a processor with an internal memory or cache of size , connected to an unbounded external memory. Both the internal and external memory are divided into blocks of size . One input/output or memory transfer operation consists of moving a block of contiguous elements from external to internal memory, and the running time of an algorithm is determined by the number of these input/output operations.


Algorithms

Algorithms in the external memory model take advantage of the fact that retrieving one object from external memory retrieves an entire block of size . This property is sometimes referred to as locality. Searching for an element among objects is possible in the external memory model using a
B-tree In computer science, a B-tree is a self-balancing tree data structure that maintains sorted data and allows searches, sequential access, insertions, and deletions in logarithmic time. The B-tree generalizes the binary search tree, allowing fo ...
with branching factor . Using a B-tree, searching, insertion, and deletion can be achieved in O(\log_B N) time (in
Big O notation Big ''O'' notation is a mathematical notation that describes the asymptotic analysis, limiting behavior of a function (mathematics), function when the Argument of a function, argument tends towards a particular value or infinity. Big O is a memb ...
). Information theoretically, this is the minimum running time possible for these operations, so using a B-tree is asymptotically optimal.
External sorting External sorting is a class of sorting algorithms that can handle massive amounts of data. External sorting is required when the data being sorted do not fit into the main memory of a computing device (usually RAM) and instead they must reside i ...
is sorting in an external memory setting. External sorting can be done via distribution sort, which is similar to
quicksort Quicksort is an efficient, general-purpose sorting algorithm. Quicksort was developed by British computer scientist Tony Hoare in 1959 and published in 1961. It is still a commonly used algorithm for sorting. Overall, it is slightly faster than ...
, or via a \tfrac -way merge sort. Both variants achieve the asymptotically optimal runtime of O\left(\frac \log _ \frac\right) to sort objects. This bound also applies to the
fast Fourier transform A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT). A Fourier transform converts a signal from its original domain (often time or space) to a representation in ...
in the external memory model. The permutation problem is to rearrange elements into a specific
permutation In mathematics, a permutation of a set can mean one of two different things: * an arrangement of its members in a sequence or linear order, or * the act or process of changing the linear order of an ordered set. An example of the first mean ...
. This can either be done either by sorting, which requires the above sorting runtime, or inserting each element in order and ignoring the benefit of locality. Thus, permutation can be done in O\left(\min \left(N, \frac \log _ \frac\right)\right) time.


Applications

The external memory model captures the
memory hierarchy In computer architecture, the memory hierarchy separates computer storage into a hierarchy based on response time. Since response time, complexity, and capacity are related, the levels may also be distinguished by their performance and contr ...
, which is not modeled in other common models used in analyzing
data structures In computer science, a data structure is a data organization and storage format that is usually chosen for efficient access to data. More precisely, a data structure is a collection of data values, the relationships among them, and the functi ...
, such as the
random-access machine In computer science, random-access machine (RAM or RA-machine) is a model of computation that describes an abstract machine in the general class of register machines. The RA-machine is very similar to the counter machine but with the added capab ...
, and is useful for proving lower bounds for data structures. The model is also useful for analyzing algorithms that work on datasets too big to fit in internal memory. A typical example is
geographic information system A geographic information system (GIS) consists of integrated computer hardware and Geographic information system software, software that store, manage, Spatial analysis, analyze, edit, output, and Cartographic design, visualize Geographic data ...
s, especially
digital elevation model A digital elevation model (DEM) or digital surface model (DSM) is a 3D computer graphics representation of elevation data to represent terrain or overlaying objects, commonly of a planet, Natural satellite, moon, or asteroid. A "global DEM" refer ...
s, where the full data set easily exceeds several gigabytes or even
terabytes The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
of data. This methodology extends beyond general purpose CPUs and also includes GPU computing as well as classical
digital signal processing Digital signal processing (DSP) is the use of digital processing, such as by computers or more specialized digital signal processors, to perform a wide variety of signal processing operations. The digital signals processed in this manner are a ...
. In general-purpose computing on graphics processing units (GPGPU), powerful graphics cards (GPUs) with little memory (compared with the more familiar system memory, which is most often referred to simply as RAM) are utilized with relatively slow CPU-to-GPU memory transfer (when compared with computation bandwidth).


History

An early use of the term "out-of-core" as an adjective is in 1962 in reference to ''devices'' that are other than the core memory of an IBM 360. An early use of the term "out-of-core" with respect to ''algorithms'' appears in 1971.


See also

*
Cache-oblivious algorithm In computing, a cache-oblivious algorithm (or cache-transcendent algorithm) is an algorithm designed to take advantage of a processor cache without having the size of the cache (or the length of the cache lines, etc.) as an explicit parameter. An ...
*
External memory graph traversal External memory graph traversal is a type of graph traversal optimized for accessing externally stored memory. Background Graph traversal is a subroutine in most graph algorithms. The goal of a graph traversal algorithm is to visit (and / or proces ...
* Online algorithm * Parallel external memory *
Streaming algorithm In computer science, streaming algorithms are algorithms for processing data streams in which the input is presented as a sequence of items and can be examined in only a few passes, typically one-pass algorithm, just one. These algorithms are desi ...


References

{{Reflist


External links


Out of Core SVD and QROut of core graphicsScalapack design
Algorithms Models of computation Cache (computing) Analysis of algorithms External memory algorithms