SlideShare une entreprise Scribd logo
1  sur  124
Télécharger pour lire hors ligne
Concurrent Tries with Efficient Non-blocking Snapshots 
Aleksandar Prokopec 
Phil Bagwell 
Martin Odersky 
École Polytechnique Fédérale de Lausanne 
Nathan Bronson 
Stanford
Motivation 
val numbers = getNumbers() 
// compute square roots 
numbers foreach { entry => 
x = entry.root 
n = entry.number 
entry.root = 0.5 * (x + n / x) 
if (abs(entry.root - x) < eps) 
numbers.remove(entry) 
}
Hash Array Mapped Tries (HAMT)
Hash Array Mapped Tries (HAMT) 
0 = 0000002
Hash Array Mapped Tries (HAMT) 
0
Hash Array Mapped Tries (HAMT) 
0 
16 = 0100002
Hash Array Mapped Tries (HAMT) 
0 
16
Hash Array Mapped Tries (HAMT) 
0 
16 
4 = 0001002
Hash Array Mapped Tries (HAMT) 
16 
0 
4 = 0001002
Hash Array Mapped Tries (HAMT) 
16 
0 
4
Hash Array Mapped Tries (HAMT) 
16 
0 
4 
12 = 0011002
Hash Array Mapped Tries (HAMT) 
16 
0 
4 
12 = 0011002
Hash Array Mapped Tries (HAMT) 
16 
0 
4 
12
Hash Array Mapped Tries (HAMT) 
16 
33 
0 
4 
12
Hash Array Mapped Tries (HAMT) 
16 
33 
0 
4 
12 
48
Hash Array Mapped Tries (HAMT) 
16 
0 
4 
12 
48 
33 
37
Hash Array Mapped Tries (HAMT) 
16 
4 
12 
48 
33 
37 
0 
3
Hash Array Mapped Tries (HAMT) 
4 
12 
16 
20 
25 
33 
37 
0 
1 
8 
9 
3 
48 
57
Immutable HAMT 
•used as immutable maps in functional languages 
4 
12 
16 
20 
25 
33 
37 
0 
1 
8 
9 
3
Immutable HAMT 
•updates rewrite path from root to leaf 
4 
12 
16 
20 
25 
33 
37 
0 
1 
8 
9 
3 
4 
12 
8 
9 
11 
insert(11)
Immutable HAMT 
•updates rewrite path from root to leaf 
4 
12 
16 
20 
25 
33 
37 
0 
1 
8 
9 
3 
4 
12 
8 
9 
11 
insert(11) 
efficient updates - logk(n)
Node compression 
48 
57 
48 
57 
1 
0 
1 
0 
48 
57 
1 
0 
1 
0 
48 
57 
10 
BITPOP(((1 << ((hc >> lev) & 1F)) – 1) & BMP)
Node compression 
48 
57 
48 
57 
1 
0 
1 
0 
48 
57 
1 
0 
1 
0 
48 
57 
10 
48 
57
Ctrie 
Can mutable HAMT be modified to be 
thread-safe?
Ctrie insert 
4 
9 
12 
16 
20 
25 
33 
37 
0 
1 
3 
48 
57 
17 = 0100012
Ctrie insert 
4 
9 
12 
16 
20 
25 
33 
37 
0 
1 
3 
48 
57 
17 = 0100012 
16 
17 
1) allocate
Ctrie insert 
4 
9 
12 
20 
25 
33 
37 
0 
1 
3 
48 
57 
17 = 0100012 
16 
17 
2) CAS
Ctrie insert 
4 
9 
12 
20 
25 
33 
37 
0 
1 
3 
48 
57 
17 = 0100012 
16 
17
Ctrie insert 
4 
9 
12 
33 
37 
0 
1 
3 
48 
57 
18 = 0100102 
16 
17 
20 
25
Ctrie insert 
4 
9 
12 
33 
37 
0 
1 
3 
48 
57 
18 = 0100102 
16 
17 
20 
25 
1) allocate 
16 
17 
18
Ctrie insert 
4 
9 
12 
33 
37 
0 
1 
3 
48 
57 
18 = 0100102 
20 
25 
2) CAS 
16 
17 
18
Ctrie insert 
4 
9 
12 
33 
37 
0 
1 
3 
48 
57 
18 = 0100102 
20 
25 
2) CAS 
16 
17 
18 
Unless…
Ctrie insert 
4 
9 
12 
33 
37 
0 
1 
3 
48 
57 
18 = 0100102 
16 
17 
20 
25 
T1-1) allocate 
16 
17 
18 
Unless… 
28 = 0111002 
T1 
T2
Ctrie insert 
4 
9 
12 
0 
1 
3 
18 = 0100102 
16 
17 
20 
25 
T1-1) allocate 
16 
17 
18 
Unless… 
28 = 0111002 
T1 
T2 
20 
25 
28 
T2-1) allocate
Ctrie insert 
4 
9 
12 
0 
1 
3 
18 = 0100102 
16 
17 
20 
25 
T1-1) allocate 
16 
17 
18 
28 = 0111002 
T1 
T2 
20 
25 
28 
T2-2) CAS
Ctrie insert 
4 
9 
12 
0 
1 
3 
18 = 0100102 
16 
17 
20 
25 
T1-2) CAS 
16 
17 
18 
28 = 0111002 
T1 
T2 
20 
25 
28 
T2-2) CAS
Ctrie insert 
4 
9 
12 
0 
1 
3 
18 = 0100102 
16 
17 
20 
25 
16 
17 
18 
28 = 0111002 
T1 
T2 
20 
25 
28 
Lost insert!
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
20 
25 
Solution: I-nodes
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
20 
25 
18 = 0100102 
28 = 0111002 
T1 
T2
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
T1 
T2 
20 
25 
18 = 0100102 
28 = 0111002 
16 
17 
18 
20 
25 
28 
T2-1) allocate 
T1-1) allocate
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
T1 
T2 
20 
25 
16 
17 
18 
20 
25 
28 
T2-2) CAS 
T1-2) CAS
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
Idea: once added to the Ctrie, I-nodes remain present.
Ctrie insert – 2nd attempt 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
Remove operation supported as well - details in the paper.
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 0
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 0
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 0
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 0
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 1
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 2
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 3
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 5
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 5 
actual size = 12
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 5 
0 
1 
actual size = 12
Ctrie size 
4 
9 
12 
0 
1 
3 
16 
17 
18 
20 
25 
28 
size = 5 
0 
1 
CAS 
actual size = 11
Ctrie size 
4 
9 
12 
16 
17 
18 
20 
25 
28 
size = 5 
0 
1 
actual size = 11
Ctrie size 
4 
9 
12 
16 
17 
18 
20 
25 
28 
size = 6 
0 
1 
actual size = 11
Ctrie size 
4 
9 
12 
16 
17 
18 
20 
25 
28 
size = 6 
0 
1 
actual size = 11 
19
Ctrie size 
4 
9 
12 
16 
17 
18 
20 
25 
28 
size = 6 
0 
1 
actual size = 11 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
16 
17 
18 
20 
25 
28 
size = 6 
0 
1 
actual size = 12 
16 
17 
18 
19 
CAS
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 6 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 6 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 7 
0 
1 
actual size = 9 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 8 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 9 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 10 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 11 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 12 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 13 
0 
1 
actual size = 12 
16 
17 
18 
19
Ctrie size 
4 
9 
12 
20 
25 
28 
size = 13 
0 
1 
actual size = 12 
16 
17 
18 
19 
But the size 
was never 13!
Global state information 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•size 
•find 
•filter 
•iterator
Global state information 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•size 
•find 
•filter 
•iterator 
 snapshot
Snapshot using locks 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19
Snapshot using locks 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•copy expensive
Snapshot using locks 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•copy expensive 
•not lock-free
Snapshot using locks 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•copy expensive 
•not lock-free 
•can insert or remove remain lock-free? 
0 
1 
2 
CAS
Snapshot using locks 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•copy expensive 
•not lock-free 
•can insert or remove remain lock-free? 
0 
1 
2 
CAS
Snapshot using logs 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•keep a linked list of previous values in each I-node
Snapshot using logs 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
0 
1 
2 
•keep a linked list of previous values in each I-node
Snapshot using logs 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
•keep a linked list of previous values in each I-node 
•when is it safe to delete old entries? 
0 
1 
2
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
root
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
root
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
snapshot! 
root
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
snapshot! 
#2 
root 
1) create new I-node at #2
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
snapshot! 
#2 
root 
2) set snapshot 
snapshot #1
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
snapshot! 
#2 
root 
3) CAS root to new I-node 
snapshot #1
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
2
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
2 
generation #2 - ok!
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
2 
generation #1 
not ok, too old!
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
1) create updated node at #2 
snapshot #1 
2 
#2 
#2
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
2) CAS to the updated node 
snapshot #1 
2 
#2 
#2
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
2 
#2 
#2 
#1 too old!
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
2 
#2 
#2 
4 
9 
12 
#2 
1) create updated node at #2
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
2 
#2 
#2 
4 
9 
12 
#2 
2) CAS
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
subsequent insert 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
finally, create a new leaf 
and CAS
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
another insert 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
another insert 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
But... this won't really work... why? 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
CAS
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
CAS 
How to fail this last CAS?
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
DCAS 
How to fail this last CAS? 
DCAS
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
How to fail this last CAS? 
DCAS - software based 
DCAS
Snapshot using immutability 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
How to fail this last CAS? 
DCAS - software based 
...creates intermediate objects 
DCAS
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
prev 
1) set prev field
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
prev 
2) CAS
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
T2: remove 19 
16 
17 
18 
prev 
3) read root generation
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
16 
17 
18 
prev 
4) if root generation changed 
CAS prev to FailedNode(prev) 
FN
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
16 
17 
18 
prev 
4) if root generation changed 
CAS prev to FailedNode(prev) 
FN
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
16 
17 
18 
prev 
5) CAS to previous value 
FN
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
16 
17 
18 
prev 
4) if root generation unchanged 
CAS prev to null
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
16 
17 
18 
4) if root generation unchanged 
CAS prev to null
GCAS - generation-compare-and-swap 
4 
9 
12 
20 
25 
28 
0 
1 
16 
17 
18 
19 
#1 
#1 
#1 
#1 
#1 
#2 
root 
snapshot #1 
#2 
#2 
4 
9 
12 
#2 
0 
1 
2 
3 
1) Replace all CAS with GCAS 
2) Replace all READ with GCAS_READ 
(which checks if prev field is null)
Snapshot-based iterator 
def iterator = 
if (isSnapshot) new Iterator(root) 
else snapshot().iterator()
Snapshot-based size 
def size = { 
val sz = 0 
val it = iterator 
while (it.hasNext) sz += 1 
sz 
}
Snapshot-based size 
def size = { 
val sz = 0 
val it = iterator 
while (it.hasNext) sz += 1 
sz 
} 
Above is O(n). 
But, by caching size in nodes - amortized O(logkn)! 
(see source code)
Snapshot-based atomic clear 
def clear() = { 
val or = READ(root) 
val nr = new INode(new Gen) 
if (!CAS(root, or, nr)) clear() 
} 
(roughly)
Evaluation - quad core i7
Evaluation – UltraSPARC T2
Evaluation – 4x 8-core i7
Evaluation – snapshot
Conclusion 
•snapshots are linearizable and lock-free 
•snapshots take constant time 
•snapshots are horizontally scalable 
•snapshots add a non-significant overhead to the algorithm if they aren't used 
•the approach may be applicable to tree-based lock-free data-structures in general (intuition)
Thank you!

Contenu connexe

Tendances

Materialized Column: An Efficient Way to Optimize Queries on Nested Columns
Materialized Column: An Efficient Way to Optimize Queries on Nested ColumnsMaterialized Column: An Efficient Way to Optimize Queries on Nested Columns
Materialized Column: An Efficient Way to Optimize Queries on Nested ColumnsDatabricks
 
Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...
Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...
Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...GeoSolutions
 
How Gotion Monitors its EV Battery Solution with InfluxDB, Grafana and AWS
How Gotion Monitors its EV Battery Solution with InfluxDB, Grafana and AWSHow Gotion Monitors its EV Battery Solution with InfluxDB, Grafana and AWS
How Gotion Monitors its EV Battery Solution with InfluxDB, Grafana and AWSInfluxData
 
SeaweedFS introduction
SeaweedFS introductionSeaweedFS introduction
SeaweedFS introductionchrislusf
 
Transaction Management on Cassandra
Transaction Management on CassandraTransaction Management on Cassandra
Transaction Management on CassandraScalar, Inc.
 
Cql – cassandra query language
Cql – cassandra query languageCql – cassandra query language
Cql – cassandra query languageCourtney Robinson
 
Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...
Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...
Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...DataWorks Summit
 
Simplify CDC Pipeline with Spark Streaming SQL and Delta Lake
Simplify CDC Pipeline with Spark Streaming SQL and Delta LakeSimplify CDC Pipeline with Spark Streaming SQL and Delta Lake
Simplify CDC Pipeline with Spark Streaming SQL and Delta LakeDatabricks
 
SteelEye 표준 제안서
SteelEye 표준 제안서SteelEye 표준 제안서
SteelEye 표준 제안서Yong-uk Choe
 
Cloudera Impala: A Modern SQL Engine for Apache Hadoop
Cloudera Impala: A Modern SQL Engine for Apache HadoopCloudera Impala: A Modern SQL Engine for Apache Hadoop
Cloudera Impala: A Modern SQL Engine for Apache HadoopCloudera, Inc.
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitColin Su
 
HBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ SalesforceHBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ SalesforceHBaseCon
 
Migrating Apache Spark ML Jobs to Spark + Tensorflow on Kubeflow
Migrating Apache Spark ML Jobs to Spark + Tensorflow on KubeflowMigrating Apache Spark ML Jobs to Spark + Tensorflow on Kubeflow
Migrating Apache Spark ML Jobs to Spark + Tensorflow on KubeflowDatabricks
 
HBase Read High Availabilty using Timeline Consistent Region Replicas
HBase Read High Availabilty using Timeline Consistent Region ReplicasHBase Read High Availabilty using Timeline Consistent Region Replicas
HBase Read High Availabilty using Timeline Consistent Region ReplicasDataWorks Summit
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deploymentYoshinori Matsunobu
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsJignesh Shah
 

Tendances (20)

Materialized Column: An Efficient Way to Optimize Queries on Nested Columns
Materialized Column: An Efficient Way to Optimize Queries on Nested ColumnsMaterialized Column: An Efficient Way to Optimize Queries on Nested Columns
Materialized Column: An Efficient Way to Optimize Queries on Nested Columns
 
Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...
Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...
Raster Data In GeoServer And GeoTools: Achievements, Issues And Future Develo...
 
How Gotion Monitors its EV Battery Solution with InfluxDB, Grafana and AWS
How Gotion Monitors its EV Battery Solution with InfluxDB, Grafana and AWSHow Gotion Monitors its EV Battery Solution with InfluxDB, Grafana and AWS
How Gotion Monitors its EV Battery Solution with InfluxDB, Grafana and AWS
 
SeaweedFS introduction
SeaweedFS introductionSeaweedFS introduction
SeaweedFS introduction
 
Transaction Management on Cassandra
Transaction Management on CassandraTransaction Management on Cassandra
Transaction Management on Cassandra
 
Flink vs. Spark
Flink vs. SparkFlink vs. Spark
Flink vs. Spark
 
Cql – cassandra query language
Cql – cassandra query languageCql – cassandra query language
Cql – cassandra query language
 
Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...
Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...
Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...
 
Simplify CDC Pipeline with Spark Streaming SQL and Delta Lake
Simplify CDC Pipeline with Spark Streaming SQL and Delta LakeSimplify CDC Pipeline with Spark Streaming SQL and Delta Lake
Simplify CDC Pipeline with Spark Streaming SQL and Delta Lake
 
SteelEye 표준 제안서
SteelEye 표준 제안서SteelEye 표준 제안서
SteelEye 표준 제안서
 
TiDB Introduction
TiDB IntroductionTiDB Introduction
TiDB Introduction
 
Cloudera Impala: A Modern SQL Engine for Apache Hadoop
Cloudera Impala: A Modern SQL Engine for Apache HadoopCloudera Impala: A Modern SQL Engine for Apache Hadoop
Cloudera Impala: A Modern SQL Engine for Apache Hadoop
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
HBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ SalesforceHBaseCon 2015: HBase Performance Tuning @ Salesforce
HBaseCon 2015: HBase Performance Tuning @ Salesforce
 
Migrating Apache Spark ML Jobs to Spark + Tensorflow on Kubeflow
Migrating Apache Spark ML Jobs to Spark + Tensorflow on KubeflowMigrating Apache Spark ML Jobs to Spark + Tensorflow on Kubeflow
Migrating Apache Spark ML Jobs to Spark + Tensorflow on Kubeflow
 
HBase Read High Availabilty using Timeline Consistent Region Replicas
HBase Read High Availabilty using Timeline Consistent Region ReplicasHBase Read High Availabilty using Timeline Consistent Region Replicas
HBase Read High Availabilty using Timeline Consistent Region Replicas
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deployment
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
 

Similaire à Ctrie Data Structure

Fast and accurate metrics. Is it actually possible?
Fast and accurate metrics. Is it actually possible?Fast and accurate metrics. Is it actually possible?
Fast and accurate metrics. Is it actually possible?Bogdan Storozhuk
 
Overview of sparse and low-rank matrix / tensor techniques
Overview of sparse and low-rank matrix / tensor techniques Overview of sparse and low-rank matrix / tensor techniques
Overview of sparse and low-rank matrix / tensor techniques Alexander Litvinenko
 
Complete Factoring Rules.ppt
Complete Factoring Rules.pptComplete Factoring Rules.ppt
Complete Factoring Rules.pptJasmin679773
 
Complete Factoring Rules in Grade 8 Math.ppt
Complete Factoring Rules in Grade 8 Math.pptComplete Factoring Rules in Grade 8 Math.ppt
Complete Factoring Rules in Grade 8 Math.pptElmabethDelaCruz2
 
Single elctron transisto PHASE 2.pptx
Single elctron transisto PHASE 2.pptxSingle elctron transisto PHASE 2.pptx
Single elctron transisto PHASE 2.pptxssuser1580e5
 
Applied Econometrics assignment3
Applied Econometrics assignment3Applied Econometrics assignment3
Applied Econometrics assignment3Chenguang Li
 
Identification of unknown parameters and prediction with hierarchical matrice...
Identification of unknown parameters and prediction with hierarchical matrice...Identification of unknown parameters and prediction with hierarchical matrice...
Identification of unknown parameters and prediction with hierarchical matrice...Alexander Litvinenko
 
Identification of unknown parameters and prediction of missing values. Compar...
Identification of unknown parameters and prediction of missing values. Compar...Identification of unknown parameters and prediction of missing values. Compar...
Identification of unknown parameters and prediction of missing values. Compar...Alexander Litvinenko
 
Insertion Sort Algorithm
Insertion Sort AlgorithmInsertion Sort Algorithm
Insertion Sort AlgorithmGail Carmichael
 
Drawing Frequency Histogram Polygon
Drawing Frequency Histogram PolygonDrawing Frequency Histogram Polygon
Drawing Frequency Histogram PolygonMoonie Kim
 
Cassandra : to be or not to be @ TechTalk
Cassandra : to be or not to be @ TechTalkCassandra : to be or not to be @ TechTalk
Cassandra : to be or not to be @ TechTalkAndriy Rymar
 
die diesem Kleid ein so romantisches Gefühl verleihen
die diesem Kleid ein so romantisches Gefühl verleihendie diesem Kleid ein so romantisches Gefühl verleihen
die diesem Kleid ein so romantisches Gefühl verleihenmokleider lee
 
Ihre Freundschaftstraditionen zu feiern und zu festigen
Ihre Freundschaftstraditionen zu feiern und zu festigenIhre Freundschaftstraditionen zu feiern und zu festigen
Ihre Freundschaftstraditionen zu feiern und zu festigenmokleider lee
 
DEF CON 23 - Yaniv Balmas and Lior Oppenheim - key logger-video mouse
DEF CON 23 - Yaniv Balmas and Lior Oppenheim - key logger-video mouseDEF CON 23 - Yaniv Balmas and Lior Oppenheim - key logger-video mouse
DEF CON 23 - Yaniv Balmas and Lior Oppenheim - key logger-video mouseFelipe Prado
 
Matrices Slide For B.Sc Students As Well For F.Sc Students
Matrices Slide For B.Sc Students As Well For F.Sc StudentsMatrices Slide For B.Sc Students As Well For F.Sc Students
Matrices Slide For B.Sc Students As Well For F.Sc StudentsAbu Bakar Soomro
 

Similaire à Ctrie Data Structure (20)

LEC 8-DS ALGO(heaps).pdf
LEC 8-DS  ALGO(heaps).pdfLEC 8-DS  ALGO(heaps).pdf
LEC 8-DS ALGO(heaps).pdf
 
Fast and accurate metrics. Is it actually possible?
Fast and accurate metrics. Is it actually possible?Fast and accurate metrics. Is it actually possible?
Fast and accurate metrics. Is it actually possible?
 
Overview of sparse and low-rank matrix / tensor techniques
Overview of sparse and low-rank matrix / tensor techniques Overview of sparse and low-rank matrix / tensor techniques
Overview of sparse and low-rank matrix / tensor techniques
 
Complete Factoring Rules.ppt
Complete Factoring Rules.pptComplete Factoring Rules.ppt
Complete Factoring Rules.ppt
 
Complete Factoring Rules in Grade 8 Math.ppt
Complete Factoring Rules in Grade 8 Math.pptComplete Factoring Rules in Grade 8 Math.ppt
Complete Factoring Rules in Grade 8 Math.ppt
 
Single elctron transisto PHASE 2.pptx
Single elctron transisto PHASE 2.pptxSingle elctron transisto PHASE 2.pptx
Single elctron transisto PHASE 2.pptx
 
Applied Econometrics assignment3
Applied Econometrics assignment3Applied Econometrics assignment3
Applied Econometrics assignment3
 
Identification of unknown parameters and prediction with hierarchical matrice...
Identification of unknown parameters and prediction with hierarchical matrice...Identification of unknown parameters and prediction with hierarchical matrice...
Identification of unknown parameters and prediction with hierarchical matrice...
 
Identification of unknown parameters and prediction of missing values. Compar...
Identification of unknown parameters and prediction of missing values. Compar...Identification of unknown parameters and prediction of missing values. Compar...
Identification of unknown parameters and prediction of missing values. Compar...
 
Insertion Sort Algorithm
Insertion Sort AlgorithmInsertion Sort Algorithm
Insertion Sort Algorithm
 
PORTIQUE VERIF
PORTIQUE VERIFPORTIQUE VERIF
PORTIQUE VERIF
 
Drawing Frequency Histogram Polygon
Drawing Frequency Histogram PolygonDrawing Frequency Histogram Polygon
Drawing Frequency Histogram Polygon
 
Cassandra : to be or not to be @ TechTalk
Cassandra : to be or not to be @ TechTalkCassandra : to be or not to be @ TechTalk
Cassandra : to be or not to be @ TechTalk
 
Sua chua may lanh cua daikin
Sua chua may lanh cua daikinSua chua may lanh cua daikin
Sua chua may lanh cua daikin
 
Bahco tools
Bahco toolsBahco tools
Bahco tools
 
die diesem Kleid ein so romantisches Gefühl verleihen
die diesem Kleid ein so romantisches Gefühl verleihendie diesem Kleid ein so romantisches Gefühl verleihen
die diesem Kleid ein so romantisches Gefühl verleihen
 
Ihre Freundschaftstraditionen zu feiern und zu festigen
Ihre Freundschaftstraditionen zu feiern und zu festigenIhre Freundschaftstraditionen zu feiern und zu festigen
Ihre Freundschaftstraditionen zu feiern und zu festigen
 
DEF CON 23 - Yaniv Balmas and Lior Oppenheim - key logger-video mouse
DEF CON 23 - Yaniv Balmas and Lior Oppenheim - key logger-video mouseDEF CON 23 - Yaniv Balmas and Lior Oppenheim - key logger-video mouse
DEF CON 23 - Yaniv Balmas and Lior Oppenheim - key logger-video mouse
 
PORTIQUE CMU
PORTIQUE CMUPORTIQUE CMU
PORTIQUE CMU
 
Matrices Slide For B.Sc Students As Well For F.Sc Students
Matrices Slide For B.Sc Students As Well For F.Sc StudentsMatrices Slide For B.Sc Students As Well For F.Sc Students
Matrices Slide For B.Sc Students As Well For F.Sc Students
 

Plus de Aleksandar Prokopec

Plus de Aleksandar Prokopec (8)

Work-stealing Tree Data Structure
Work-stealing Tree Data StructureWork-stealing Tree Data Structure
Work-stealing Tree Data Structure
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
ScalaBlitz
ScalaBlitzScalaBlitz
ScalaBlitz
 
Scala Parallel Collections
Scala Parallel CollectionsScala Parallel Collections
Scala Parallel Collections
 
ScalaMeter 2014
ScalaMeter 2014ScalaMeter 2014
ScalaMeter 2014
 
ScalaMeter 2012
ScalaMeter 2012ScalaMeter 2012
ScalaMeter 2012
 
Reactive Collections
Reactive CollectionsReactive Collections
Reactive Collections
 
ScalaDays 2014 - Reactive Scala 3D Game Engine
ScalaDays 2014 - Reactive Scala 3D Game Engine ScalaDays 2014 - Reactive Scala 3D Game Engine
ScalaDays 2014 - Reactive Scala 3D Game Engine
 

Dernier

WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...chiefasafspells
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 

Dernier (20)

WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 

Ctrie Data Structure

  • 1. Concurrent Tries with Efficient Non-blocking Snapshots Aleksandar Prokopec Phil Bagwell Martin Odersky École Polytechnique Fédérale de Lausanne Nathan Bronson Stanford
  • 2. Motivation val numbers = getNumbers() // compute square roots numbers foreach { entry => x = entry.root n = entry.number entry.root = 0.5 * (x + n / x) if (abs(entry.root - x) < eps) numbers.remove(entry) }
  • 3. Hash Array Mapped Tries (HAMT)
  • 4. Hash Array Mapped Tries (HAMT) 0 = 0000002
  • 5. Hash Array Mapped Tries (HAMT) 0
  • 6. Hash Array Mapped Tries (HAMT) 0 16 = 0100002
  • 7. Hash Array Mapped Tries (HAMT) 0 16
  • 8. Hash Array Mapped Tries (HAMT) 0 16 4 = 0001002
  • 9. Hash Array Mapped Tries (HAMT) 16 0 4 = 0001002
  • 10. Hash Array Mapped Tries (HAMT) 16 0 4
  • 11. Hash Array Mapped Tries (HAMT) 16 0 4 12 = 0011002
  • 12. Hash Array Mapped Tries (HAMT) 16 0 4 12 = 0011002
  • 13. Hash Array Mapped Tries (HAMT) 16 0 4 12
  • 14. Hash Array Mapped Tries (HAMT) 16 33 0 4 12
  • 15. Hash Array Mapped Tries (HAMT) 16 33 0 4 12 48
  • 16. Hash Array Mapped Tries (HAMT) 16 0 4 12 48 33 37
  • 17. Hash Array Mapped Tries (HAMT) 16 4 12 48 33 37 0 3
  • 18. Hash Array Mapped Tries (HAMT) 4 12 16 20 25 33 37 0 1 8 9 3 48 57
  • 19. Immutable HAMT •used as immutable maps in functional languages 4 12 16 20 25 33 37 0 1 8 9 3
  • 20. Immutable HAMT •updates rewrite path from root to leaf 4 12 16 20 25 33 37 0 1 8 9 3 4 12 8 9 11 insert(11)
  • 21. Immutable HAMT •updates rewrite path from root to leaf 4 12 16 20 25 33 37 0 1 8 9 3 4 12 8 9 11 insert(11) efficient updates - logk(n)
  • 22. Node compression 48 57 48 57 1 0 1 0 48 57 1 0 1 0 48 57 10 BITPOP(((1 << ((hc >> lev) & 1F)) – 1) & BMP)
  • 23. Node compression 48 57 48 57 1 0 1 0 48 57 1 0 1 0 48 57 10 48 57
  • 24. Ctrie Can mutable HAMT be modified to be thread-safe?
  • 25. Ctrie insert 4 9 12 16 20 25 33 37 0 1 3 48 57 17 = 0100012
  • 26. Ctrie insert 4 9 12 16 20 25 33 37 0 1 3 48 57 17 = 0100012 16 17 1) allocate
  • 27. Ctrie insert 4 9 12 20 25 33 37 0 1 3 48 57 17 = 0100012 16 17 2) CAS
  • 28. Ctrie insert 4 9 12 20 25 33 37 0 1 3 48 57 17 = 0100012 16 17
  • 29. Ctrie insert 4 9 12 33 37 0 1 3 48 57 18 = 0100102 16 17 20 25
  • 30. Ctrie insert 4 9 12 33 37 0 1 3 48 57 18 = 0100102 16 17 20 25 1) allocate 16 17 18
  • 31. Ctrie insert 4 9 12 33 37 0 1 3 48 57 18 = 0100102 20 25 2) CAS 16 17 18
  • 32. Ctrie insert 4 9 12 33 37 0 1 3 48 57 18 = 0100102 20 25 2) CAS 16 17 18 Unless…
  • 33. Ctrie insert 4 9 12 33 37 0 1 3 48 57 18 = 0100102 16 17 20 25 T1-1) allocate 16 17 18 Unless… 28 = 0111002 T1 T2
  • 34. Ctrie insert 4 9 12 0 1 3 18 = 0100102 16 17 20 25 T1-1) allocate 16 17 18 Unless… 28 = 0111002 T1 T2 20 25 28 T2-1) allocate
  • 35. Ctrie insert 4 9 12 0 1 3 18 = 0100102 16 17 20 25 T1-1) allocate 16 17 18 28 = 0111002 T1 T2 20 25 28 T2-2) CAS
  • 36. Ctrie insert 4 9 12 0 1 3 18 = 0100102 16 17 20 25 T1-2) CAS 16 17 18 28 = 0111002 T1 T2 20 25 28 T2-2) CAS
  • 37. Ctrie insert 4 9 12 0 1 3 18 = 0100102 16 17 20 25 16 17 18 28 = 0111002 T1 T2 20 25 28 Lost insert!
  • 38. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 20 25 Solution: I-nodes
  • 39. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 20 25 18 = 0100102 28 = 0111002 T1 T2
  • 40. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 T1 T2 20 25 18 = 0100102 28 = 0111002 16 17 18 20 25 28 T2-1) allocate T1-1) allocate
  • 41. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 T1 T2 20 25 16 17 18 20 25 28 T2-2) CAS T1-2) CAS
  • 42. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 18 20 25 28
  • 43. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 18 20 25 28 Idea: once added to the Ctrie, I-nodes remain present.
  • 44. Ctrie insert – 2nd attempt 4 9 12 0 1 3 16 17 18 20 25 28 Remove operation supported as well - details in the paper.
  • 45. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28
  • 46. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 0
  • 47. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 0
  • 48. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 0
  • 49. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 0
  • 50. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 1
  • 51. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 2
  • 52. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 3
  • 53. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 5
  • 54. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 5 actual size = 12
  • 55. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 5 0 1 actual size = 12
  • 56. Ctrie size 4 9 12 0 1 3 16 17 18 20 25 28 size = 5 0 1 CAS actual size = 11
  • 57. Ctrie size 4 9 12 16 17 18 20 25 28 size = 5 0 1 actual size = 11
  • 58. Ctrie size 4 9 12 16 17 18 20 25 28 size = 6 0 1 actual size = 11
  • 59. Ctrie size 4 9 12 16 17 18 20 25 28 size = 6 0 1 actual size = 11 19
  • 60. Ctrie size 4 9 12 16 17 18 20 25 28 size = 6 0 1 actual size = 11 16 17 18 19
  • 61. Ctrie size 4 9 12 16 17 18 20 25 28 size = 6 0 1 actual size = 12 16 17 18 19 CAS
  • 62. Ctrie size 4 9 12 20 25 28 size = 6 0 1 actual size = 12 16 17 18 19
  • 63. Ctrie size 4 9 12 20 25 28 size = 6 0 1 actual size = 12 16 17 18 19
  • 64. Ctrie size 4 9 12 20 25 28 size = 7 0 1 actual size = 9 16 17 18 19
  • 65. Ctrie size 4 9 12 20 25 28 size = 8 0 1 actual size = 12 16 17 18 19
  • 66. Ctrie size 4 9 12 20 25 28 size = 9 0 1 actual size = 12 16 17 18 19
  • 67. Ctrie size 4 9 12 20 25 28 size = 10 0 1 actual size = 12 16 17 18 19
  • 68. Ctrie size 4 9 12 20 25 28 size = 11 0 1 actual size = 12 16 17 18 19
  • 69. Ctrie size 4 9 12 20 25 28 size = 12 0 1 actual size = 12 16 17 18 19
  • 70. Ctrie size 4 9 12 20 25 28 size = 13 0 1 actual size = 12 16 17 18 19
  • 71. Ctrie size 4 9 12 20 25 28 size = 13 0 1 actual size = 12 16 17 18 19 But the size was never 13!
  • 72. Global state information 4 9 12 20 25 28 0 1 16 17 18 19 •size •find •filter •iterator
  • 73. Global state information 4 9 12 20 25 28 0 1 16 17 18 19 •size •find •filter •iterator  snapshot
  • 74. Snapshot using locks 4 9 12 20 25 28 0 1 16 17 18 19
  • 75. Snapshot using locks 4 9 12 20 25 28 0 1 16 17 18 19 •copy expensive
  • 76. Snapshot using locks 4 9 12 20 25 28 0 1 16 17 18 19 •copy expensive •not lock-free
  • 77. Snapshot using locks 4 9 12 20 25 28 0 1 16 17 18 19 •copy expensive •not lock-free •can insert or remove remain lock-free? 0 1 2 CAS
  • 78. Snapshot using locks 4 9 12 20 25 28 0 1 16 17 18 19 •copy expensive •not lock-free •can insert or remove remain lock-free? 0 1 2 CAS
  • 79. Snapshot using logs 4 9 12 20 25 28 0 1 16 17 18 19 •keep a linked list of previous values in each I-node
  • 80. Snapshot using logs 4 9 12 20 25 28 0 1 16 17 18 19 0 1 2 •keep a linked list of previous values in each I-node
  • 81. Snapshot using logs 4 9 12 20 25 28 0 1 16 17 18 19 •keep a linked list of previous values in each I-node •when is it safe to delete old entries? 0 1 2
  • 82. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 root
  • 83. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 root
  • 84. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 snapshot! root
  • 85. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 snapshot! #2 root 1) create new I-node at #2
  • 86. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 snapshot! #2 root 2) set snapshot snapshot #1
  • 87. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 snapshot! #2 root 3) CAS root to new I-node snapshot #1
  • 88. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 2
  • 89. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 2 generation #2 - ok!
  • 90. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 2 generation #1 not ok, too old!
  • 91. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root 1) create updated node at #2 snapshot #1 2 #2 #2
  • 92. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root 2) CAS to the updated node snapshot #1 2 #2 #2
  • 93. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 2 #2 #2 #1 too old!
  • 94. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 2 #2 #2 4 9 12 #2 1) create updated node at #2
  • 95. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 2 #2 #2 4 9 12 #2 2) CAS
  • 96. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 subsequent insert #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 finally, create a new leaf and CAS
  • 97. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 another insert #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3
  • 98. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 another insert #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3
  • 99. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 But... this won't really work... why? #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3
  • 100. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3 T2: remove 19 16 17 18
  • 101. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3 T2: remove 19 16 17 18 CAS
  • 102. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3 T2: remove 19 16 17 18 CAS How to fail this last CAS?
  • 103. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3 T2: remove 19 16 17 18 DCAS How to fail this last CAS? DCAS
  • 104. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3 T2: remove 19 16 17 18 How to fail this last CAS? DCAS - software based DCAS
  • 105. Snapshot using immutability 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 0 1 2 3 T2: remove 19 16 17 18 How to fail this last CAS? DCAS - software based ...creates intermediate objects DCAS
  • 106. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 T2: remove 19 16 17 18 prev 1) set prev field
  • 107. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 T2: remove 19 16 17 18 prev 2) CAS
  • 108. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 T2: remove 19 16 17 18 prev 3) read root generation
  • 109. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 16 17 18 prev 4) if root generation changed CAS prev to FailedNode(prev) FN
  • 110. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 16 17 18 prev 4) if root generation changed CAS prev to FailedNode(prev) FN
  • 111. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 16 17 18 prev 5) CAS to previous value FN
  • 112. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 16 17 18 prev 4) if root generation unchanged CAS prev to null
  • 113. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 16 17 18 4) if root generation unchanged CAS prev to null
  • 114. GCAS - generation-compare-and-swap 4 9 12 20 25 28 0 1 16 17 18 19 #1 #1 #1 #1 #1 #2 root snapshot #1 #2 #2 4 9 12 #2 0 1 2 3 1) Replace all CAS with GCAS 2) Replace all READ with GCAS_READ (which checks if prev field is null)
  • 115. Snapshot-based iterator def iterator = if (isSnapshot) new Iterator(root) else snapshot().iterator()
  • 116. Snapshot-based size def size = { val sz = 0 val it = iterator while (it.hasNext) sz += 1 sz }
  • 117. Snapshot-based size def size = { val sz = 0 val it = iterator while (it.hasNext) sz += 1 sz } Above is O(n). But, by caching size in nodes - amortized O(logkn)! (see source code)
  • 118. Snapshot-based atomic clear def clear() = { val or = READ(root) val nr = new INode(new Gen) if (!CAS(root, or, nr)) clear() } (roughly)
  • 119. Evaluation - quad core i7
  • 121. Evaluation – 4x 8-core i7
  • 123. Conclusion •snapshots are linearizable and lock-free •snapshots take constant time •snapshots are horizontally scalable •snapshots add a non-significant overhead to the algorithm if they aren't used •the approach may be applicable to tree-based lock-free data-structures in general (intuition)