cache-oblivious dynamic dictionaries with update/query tradeoffs

Post on 24-Feb-2016

33 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

. Erik D. Demaine MIT. Gerth Stølting Brodal Aarhus University. s ize- x input buffer. √ N. …. Upper level: at most x 1/2 /4 subboxes. Cache-Oblivious Dynamic Dictionaries with Update/Query Tradeoffs. √ x -box. N. …. s ize- x 3/2 middle buffer. √ N. …. - PowerPoint PPT Presentation

TRANSCRIPT

Problem and Results Construction Ideas

Dictionary

Maintain a set of elements Search(x) – return the largest element ≤ x in the set (static and dynamic version) Insert new / delete existing element (dynamic version)

Models

Static Dictionaries Perform a recursive memory layout of a perfect binary search tree Subtrees of height O(log2 B) fit into O(1) blocks, i.e. search cost becomes O(log2 N / log2 B) = O(logB N) I/Os

Dynamic Dictionaries

Updates are buffered at the nodes + propagated down in batches updates faster than queries Recursive layout of buffers Keep pointers between levels to provide efficient searches

References[1] Bayer, McCreight. Organization and maintenance

of large ordered indexes. Acta Informatica 1972[2] Brodal, Demaine, Iacono, Fineman, Langerrman,

Munro. Cache-oblivious dynamic dictionaries with update/query tradeoffs. SODA 2010

[3] Brodal, Fagerberg. Lower bounds for external memory dictionaries. SODA 2003

[4] Brodal, Fagerberg, Jacob. Cache-oblivious search trees via binary trees of small height. SODA 2002

[5] Prokop. Cache-oblivious algorithms. MIT Master’s thesis 1999

Cache-Oblivious Dynamic Dictionaries with Update/Query Tradeoffs

MADALGO – Center for Massive Data Algorithmics, a Center of the Danish National Research Foundation

Gerth Stølting BrodalAarhus University

Search Updates

Bayer, McCreight 1972 O(logB N) O(logB N)I/O

ModelBrodal, Fagerberg 2003 O( ∙ logB N) O( ∙ logB N)

Prokop 1999 O(logB N) N/A Cach

e-oblivious

Model

Brodal, Jacob, Fagerberg 2002 O(logB N) O(logB N)

Brodal, Demaine, Iacono, Fineman, Langerman, Munro 2010 O( ∙ logB N) O( ∙ logB N)

Erik D. DemaineMIT

16 5

3

10

1927

24

4

17

7

28

218

13

1422

I/O Model[Aggarwal, Vitter 1988]

Fast internal memory, size M Slow memory, blocks of size B Cost = number of block transfers

(I/Os) between the two memories

Cache-oblivious Model[Frigo, Leiserson, Prokop, Ramachandran 1999]

Algorithms are not parameterized by B and M

Analyzed in the ideal-cache model, same as I/O model but using optimal cache replacement strategy

Algorithms automatically apply to multi-level hierarchies

CPUFast

memory Block

M/BSlow memory

BB

…N

√N

√N

Memory layoutN √N

...

log2 Nlog2 B

…Recursive memory layout

Bina

ry se

arch

tree

[Prokop 1999]

[Brodal, Demaine, Iacono, Fineman, Langerrman, Munro 2010]

size-x input buffer

size-x2 output buffer

size-x3/2 middle buffer

√x-box

√x-box

Upper level: at most x1/2/4 subboxes

Lower level: at most x/4 subboxes

input middle… … output

Subboxes stored contiguously in arbitrary order

Unused (currently empty) subboxes are preallocated

Search path

x-box

1εBε

1εBε

top related