4.5k likes | 4.66k Views
Cache-Oblivious Algorithms. By Ofer Freedman. The Real World In Theory LCS problem Analysis. 1. The Real World. חומרה. Cache Miss. Page Fault. I/O Bound. Latency. 2. In Theory. RAM model. all memories are equal. all memories are equal But some more than Others.
E N D
Cache-Oblivious Algorithms By Ofer Freedman
The Real World • In Theory • LCS problem • Analysis
all memories are equal But some more than Others
standard external-memory model AlokAggarwal and Jeff Vitter, 1988
Storage > ∞ M – finite memory B – block size
Some results: Scanning: Binary Search: Sort:
In B-trees: B = B
Cache-Oblivious Model Frigo, Leiserson, Prokop, and Ramachandran, 1999
Storage > ∞ M – finite memory B – block size
CPU RAM L2Cache L1Cache
Memory Storage CPU RAM L2Cache L1Cache
Memory Storage CPU RAM L2Cache L1Cache
Memory Storage CPU RAM L2Cache L1Cache
(double) optimal policy (with M memory) FIFO and LRU (with 2M cache)
Input: 2 strings X and Y,of length n and m.
Output: Longest Common Subsequence of X and Y
HUMAN CHIMPANZEE
HUMAN CHIMPANZEE