<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.aletopedia.org/index.php?action=history&amp;feed=atom&amp;title=External_memory_algorithm</id>
	<title>External memory algorithm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.aletopedia.org/index.php?action=history&amp;feed=atom&amp;title=External_memory_algorithm"/>
	<link rel="alternate" type="text/html" href="https://www.aletopedia.org/index.php?title=External_memory_algorithm&amp;action=history"/>
	<updated>2026-12-02T22:27:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://www.aletopedia.org/index.php?title=External_memory_algorithm&amp;diff=1013317&amp;oldid=prev</id>
		<title>imported&gt;Trappist the monk: /* top */ clean up, removed deprecated |citeseerx= parameters;</title>
		<link rel="alternate" type="text/html" href="https://www.aletopedia.org/index.php?title=External_memory_algorithm&amp;diff=1013317&amp;oldid=prev"/>
		<updated>2026-09-14T22:08:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;top: &lt;/span&gt; clean up, removed deprecated |citeseerx= parameters;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{short description|Algorithms for processing data too large to fit into a computer&amp;#039;s main memory at once}}&lt;br /&gt;
In [[computing]], &amp;#039;&amp;#039;&amp;#039;external memory algorithms&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;out-of-core algorithms&amp;#039;&amp;#039;&amp;#039; are [[algorithms]] that are designed to process data that are too large to fit into a computer&amp;#039;s [[main memory]] 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]].&amp;lt;ref&amp;gt;{{Cite journal|author=Vitter, J. S.|title=External Memory Algorithms and Data Structures: Dealing with MASSIVE DATA|journal= ACM Computing Surveys|volume= 33|issue=2|pages=209–271| year= 2001|doi=10.1145/384192.384193|s2cid=2155038}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Vitter&amp;quot;&amp;gt;{{Cite book|author=Vitter, J. S.|url=http://www.ittc.ku.edu/~jsv/Papers/Vit.IO_book.pdf|title=Algorithms and Data Structures for External Memory|journal=Foundations and Trends in Theoretical Computer Science |volume=2|issue=4|pages=305–474|series=Series on Foundations and Trends in Theoretical Computer Science|publisher=Now Publishers|location=Hanover, MA|year=2008|doi=10.1561/0400000014|isbn=978-1-60198-106-6}}&amp;lt;/ref&amp;gt; External memory algorithms are analyzed in the &amp;#039;&amp;#039;&amp;#039;external memory model&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Model ==&lt;br /&gt;
[[File:External memory.svg|thumb|The cache on the left holds &amp;lt;math&amp;gt;\tfrac{M}{B}&amp;lt;/math&amp;gt; blocks of size &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; each, for a total of {{mvar|M}} objects. The external memory on the right is unbounded.]]&lt;br /&gt;
External memory algorithms are analyzed in an idealized [[model of computation]] called the external memory model (or &amp;#039;&amp;#039;&amp;#039;I/O model&amp;#039;&amp;#039;&amp;#039;, or &amp;#039;&amp;#039;&amp;#039;disk access model&amp;#039;&amp;#039;&amp;#039;). The external memory model is an [[abstract machine]] similar to the [[RAM model|RAM machine model]], but with a [[Cache (computing)|cache]] in addition to [[main memory]]. The model captures the fact that read and write operations are much faster in a [[cache (computing)|cache]] than in [[main memory]], and that [[Reading (computer)|reading]] long contiguous blocks is faster than reading randomly using a [[disk read-and-write head]]. The [[running time]] of an [[algorithm]] in the external memory model is defined by the number of reads and writes to memory required.&amp;lt;ref name=&amp;quot;Springer&amp;quot;&amp;gt;{{cite encyclopedia |encyclopedia= Encyclopedia of Database Systems|pages= 1333–1334|year= 2009|publisher= [[Springer Science+Business Media]]|doi= 10.1007/978-0-387-39940-9_752|last1 = Zhang|first1 = Donghui|last2= Tsotras|first2= Vassilis J.|last3= Levialdi|first3= Stefano|last4= Grinstein|first4= Georges|last5= Berry|first5= Damon Andrew|last6= Gouet-Brunet|first6= Valerie|last7= Kosch|first7= Harald|last8= Döller|first8= Mario|last9= Döller|first9= Mario|last10= Kosch|first10= Harald|last11= Maier|first11= Paul|last12= Bhattacharya|first12= Arnab|last13= Ljosa|first13= Vebjorn|last14= Nack|first14= Frank|last15= Bartolini|first15= Ilaria|last16= Gouet-Brunet|first16= Valerie|last17= Mei|first17= Tao|last18= Rui|first18= Yong|last19= Crucianu|first19= Michel|last20= Shih|first20= Frank Y.|last21= Fan|first21= Wenfei|last22= Ullman-Cullere|first22= Mollie|last23= Clark|first23= Eugene|last24= Aronson|first24= Samuel|last25= Mellin|first25= Jonas|last26= Berndtsson|first26= Mikael|last27= Grahne|first27= Gösta|last28= Bertossi|first28= Leopoldo|last29= Dong|first29= Guozhu|last30= Su|first30= Jianwen|title= I/O Model of Computation|display-authors= 29|isbn= 978-0-387-35544-3}}&amp;lt;/ref&amp;gt; The model was introduced by Alok Aggarwal and [[Jeffrey Vitter]] in 1988.&amp;lt;ref name=&amp;quot;Aggarwal88&amp;quot;&amp;gt;{{cite journal|last1=Aggarwal|first1=Alok|last2=Vitter|first2=Jeffrey|author2-link=Jeffrey Vitter|title=The input/output complexity of sorting and related problems|journal=[[Communications of the ACM]]|volume=31|issue=9|pages=1116–1127|date=1988|doi=10.1145/48529.48535|s2cid=6264984|url=https://hal.inria.fr/inria-00075827|doi-access=free}}&amp;lt;/ref&amp;gt; The external memory model is related to the [[Cache-oblivious algorithm#Idealized cache model|cache-oblivious model]], but algorithms in the external memory model may know both the [[Block (data storage)|block size]] and the [[Cache (computing)|cache]] size. For this reason, the model is sometimes referred to as the &amp;#039;&amp;#039;&amp;#039;cache-aware model&amp;#039;&amp;#039;&amp;#039;.&amp;lt;ref name=&amp;quot;Demaine02&amp;quot;&amp;gt;{{cite conference|last1=Demaine|first1=Erik|author1-link=Erik Demaine|year=2002|title=Cache-Oblivious Algorithms and Data Structures|url=http://erikdemaine.org/papers/BRICS2002/paper.pdf|conference=Lecture Notes from the EEF Summer School on Massive Data Sets|location=Aarhus|publisher=BRICS}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The model consists of a [[processor (computing)|processor]] with an internal memory or [[cache (computing)|cache]] of size {{mvar|M}}, connected to an [[infinity|unbounded]] external memory. Both the internal and external memory are divided into [[Block (data storage)|blocks]] of size {{mvar|B}}. One input/output or memory transfer operation consists of moving a block of {{mvar|B}} contiguous elements from external to internal memory, and the [[running time]] of an algorithm is determined by the number of these input/output operations.&amp;lt;ref name=&amp;quot;Aggarwal88&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Algorithms ==&lt;br /&gt;
Algorithms in the external memory model take advantage of the fact that retrieving one object from external memory retrieves an entire block of size {{mvar|B}}. This property is sometimes referred to as locality.&lt;br /&gt;
&lt;br /&gt;
Searching for an element among {{mvar|N}} objects is possible in the external memory model using a [[B-tree]] with branching factor {{mvar|B}}. Using a B-tree, searching, insertion, and deletion can be achieved in &amp;lt;math&amp;gt;O(\log_B N)&amp;lt;/math&amp;gt; time (in [[Big O notation]]). [[Information theory|Information theoretically]], this is the minimum [[running time]] possible for these operations, so using a B-tree is [[asymptotically optimal]].&amp;lt;ref name=&amp;quot;Aggarwal88&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[External sorting]] is sorting in an external memory setting. External sorting can be done via distribution sort, which is similar to [[quicksort]], or via a &amp;lt;math&amp;gt;\tfrac{M}{B}&amp;lt;/math&amp;gt;[[K-way merge algorithm|-way merge sort]]. Both variants achieve the [[asymptotically optimal]] runtime of &amp;lt;math&amp;gt;O\left(\frac{N}{B} \log _{\frac{M}{B}} \frac{N}{B}\right)&amp;lt;/math&amp;gt; to sort {{mvar|N}} objects. This bound also applies to the [[fast Fourier transform]] in the external memory model.&amp;lt;ref name=&amp;quot;Vitter&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The permutation problem is to rearrange {{mvar|N}} elements into a specific [[permutation]]. 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 &amp;lt;math&amp;gt;O\left(\min \left(N, \frac{N}{B} \log _{\frac{M}{B}} \frac{N}{B}\right)\right)&amp;lt;/math&amp;gt; time.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
The external memory model captures the [[memory hierarchy]], which is not modeled in other common models used in analyzing [[data structures]], such as the [[random-access machine]], and is useful for proving [[lower bound]]s for data structures. The model is also useful for analyzing algorithms that work on datasets too big to fit in internal memory.&amp;lt;ref name=&amp;quot;Aggarwal88&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A typical example is [[geographic information system]]s, especially [[digital elevation model]]s, where the full data set easily exceeds several [[gigabytes]] or even [[terabytes]] of data.&lt;br /&gt;
&lt;br /&gt;
This methodology extends beyond [[Central processing unit|general purpose CPUs]] and also includes [[Graphics processing unit|GPU]] computing as well as classical [[digital signal processing]]. In [[General-purpose computing on graphics processing units (software)|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 [[random-access memory|RAM]]) are utilized with relatively slow CPU-to-GPU memory transfer (when compared with computation bandwidth).&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
An early use of the term &amp;quot;out-of-core&amp;quot; as an adjective is in 1962 in reference to &amp;#039;&amp;#039;devices&amp;#039;&amp;#039; that are other than the [[Magnetic-core memory|core memory]] of an [[IBM 360]].&amp;lt;ref&amp;gt;{{cite book |author=&amp;lt;!--Staff writer(s); no by-line.--&amp;gt; |title=NASA SP |url=https://books.google.com/books?id=oOOj8pHh6t8C&amp;amp;q=%22out-of-core%22+algorithm |publisher=NASA |page=276 |date=1962}}&amp;lt;/ref&amp;gt; An early use of the term &amp;quot;out-of-core&amp;quot; with respect to &amp;#039;&amp;#039;algorithms&amp;#039;&amp;#039; appears in 1971.&amp;lt;ref&amp;gt;{{cite book |title=Computers in Crisis |url=https://books.google.com/books?id=eHVQAAAAMAAJ&amp;amp;q=%22out-of-core%22 |publisher=ACM |page=296 |date=1971}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Cache-oblivious algorithm]]&lt;br /&gt;
*[[External memory graph traversal]]&lt;br /&gt;
*[[Online algorithm]]&lt;br /&gt;
*[[Parallel external memory]]&lt;br /&gt;
*[[Streaming algorithm]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.tau.ac.il/~stoledo/Bib/Pubs/pp01-qr.pdf Out of Core SVD and QR]&lt;br /&gt;
*[http://cis.poly.edu/chiang/Vis02-tutorial4.pdf Out of core graphics]&lt;br /&gt;
*[http://www.netlib.org/utk/people/JackDongarra/pdf/ooc-scalapack.pdf Scalapack design]&lt;br /&gt;
&lt;br /&gt;
[[Category:Algorithms]]&lt;br /&gt;
[[Category:Models of computation]]&lt;br /&gt;
[[Category:Cache (computing)]]&lt;br /&gt;
[[Category:Analysis of algorithms]]&lt;br /&gt;
[[Category:External memory algorithms]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Trappist the monk</name></author>
	</entry>
</feed>