![Page 1: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/1.jpg)
Distributed Transactional Memory for General Networks
Gokarna Sharma Costas Busch
Srivathsan Srinivasagopalan
Louisiana State University
May 24, 2012
![Page 2: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/2.jpg)
Distributed Transactional Memory
• Transactions run on network nodes
• They ask for shared objects distributed over the network for either read or write
• They appear to execute atomically
• The reads and writes on shared objects are supported through three operations: Publish Lookup Move
2
![Page 3: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/3.jpg)
3
Predecessor node
Suppose the object ξ is at node and is a requesting node
ξRequesting node
Suppose transactions are immobile and the objects are mobile
![Page 4: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/4.jpg)
4
Read-only copy Main copy
Lookup operation
ξξ
Replicates the object to the requesting node
![Page 5: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/5.jpg)
5
Read-only copy Main copy
Lookup operation
ξξ
Replicates the object to the requesting nodes
Read-only copyξ
![Page 6: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/6.jpg)
6
Main copy Invalidated
Move operation
ξξ
Relocates the object explicitly to the requesting node
![Page 7: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/7.jpg)
7
Invalidated
Move operation
ξ
Relocates the object explicitly to the requesting node
Main copyξ
Invalidatedξ
![Page 8: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/8.jpg)
Need a distributed directory protocol To provide objects to the requesting nodes
efficiently implementing Publish, Lookup, and Move operations
To maintain consistency among the shared object copies
8
![Page 9: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/9.jpg)
Existing Approaches
9
Protocol Stretch Network Kind
Runs on
Arrow[DISC’98]
O(SST)=O(D) General Spanning tree
Relay[OPODIS’09]
O(SST)=O(D) General Spanning tree
Combine[SSS’10]
O(SOT)=O(D) General Overlay tree
Ballistic[DISC’05]
O(log D) Constant-doubling dimension
Hierarchical directory with independent sets
D is the diameter of the network kind S* is the stretch of the tree used
![Page 10: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/10.jpg)
Scalability Issues/Race Conditions Locking is required
10
A
object
parent(A)
lookup parent(A)
move parent(A)
B
Probes left to right
C
Level k
Level k-1
Level k+1
Ballistic configuration at time t
From rootLookup from C is probing parent(B) at t
![Page 11: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/11.jpg)
11
Spiral directory protocol for general networks with O(log2n . log D) stretch avoiding race
conditions
![Page 12: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/12.jpg)
In The Remaining…
• Model• Hierarchical Directory Construction
• How Spiral Supports Publish, Lookup, and Move
• Analogy to a Distributed Queue
• Spiral Hierarchy Parameters and Analysis• Lookup Stretch• Move Stretch
• Discussion12
![Page 13: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/13.jpg)
Model• General network G = (V,E) of n reliable nodes with
diameter D
• One shared object
• Nodes receive-compute-send atomically
• Nodes are uniquely identified
• Node u can send to node v if it knows v
• One node executes one request at a time13
![Page 14: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/14.jpg)
14
Hierarchical clusteringSpiral Approach:
Network graph
![Page 15: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/15.jpg)
15
Hierarchical clusteringSpiral Approach:
Alternative representation as a hierarchy tree with leader nodes
![Page 16: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/16.jpg)
16
At the lowest level (level 0) every node is a cluster
Directories at each level cluster, downward pointer if object locality known
![Page 17: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/17.jpg)
17
Owner node
root
A Publish operation
Assume that is the creator of which invokes the Publish operation
Nodes know their parent in the hierarchy
ξ
ξ
![Page 18: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/18.jpg)
18
root
Send request to the leader
![Page 19: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/19.jpg)
19
root
Continue up phase
Sets downward pointer while going up
![Page 20: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/20.jpg)
20
root
Continue up phase
Sets downward pointer while going up
![Page 21: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/21.jpg)
21
root
Root node found, stop up phase
![Page 22: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/22.jpg)
22
root
A successful Publish operation
Predecessor nodeξ
![Page 23: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/23.jpg)
23
Requesting node Predecessor node
root
Supporting a Move operation
Initially, nodes point downward to object owner (predecessor node) due to Publish operation
Nodes know their parent in the hierarchy
ξ
![Page 24: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/24.jpg)
24
Send request to leader node of the cluster upward in hierarchy
root
![Page 25: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/25.jpg)
25
Continue up phase until downward pointer found
root
Sets downward path while going up
![Page 26: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/26.jpg)
26
Continue up phase
root
Sets downward path while going up
![Page 27: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/27.jpg)
27
Continue up phase
root
Sets downward path while going up
![Page 28: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/28.jpg)
28
Downward pointer found, start down phase
root
Discards path while going down
![Page 29: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/29.jpg)
29
Continue down phase
root
Discards path while going down
![Page 30: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/30.jpg)
30
Continue down phase
root
Discards path while going down
![Page 31: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/31.jpg)
31
Predecessor reached, object is moved from node to node
root
Lookup is similar without change in the directory structure and only a read-only copy of the object is sent
![Page 32: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/32.jpg)
32
Distributed Queue
root
u
u
tailhead
![Page 33: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/33.jpg)
33
Distributed Queue
root
u
u
tailheadv
v
![Page 34: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/34.jpg)
34
root
uv w
Distributed Queue
u
tailhead
v w
![Page 35: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/35.jpg)
35
root
uv w
Distributed Queue
tailhead
v w
![Page 36: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/36.jpg)
36
root
uv w
Distributed Queue
tailhead
w
![Page 37: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/37.jpg)
37
Spiral is Starvation Free
All requests terminate.
There is always a path of downward pointers from the root node to a leaf node.
No set of finite number of requests whose successor links form a cycle.
All the requests terminate in a bounded amount of time.
root
uv w
![Page 38: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/38.jpg)
38
Spiral avoids Race condition Do not need to lock simultaneously multiple parent
nodes in the same label. Label all the parents in each level and visit them in
the order of the labels.
2 1
A
object
parent(A)
lookup parent(A)
move parent(A)
B
3
C
Level k
Level k-1
Level k+1
From root
parent(B)
![Page 39: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/39.jpg)
Spiral Hierarchy
• (O(log n), O(log n))-labeled sparse cover hierarchy constructed from O(log n) hierarchical partitions
Level 0, each node belongs to exactly one cluster
Level h, all the nodes belong to one cluster with root r
Level 0 < i < h, each node belongs to exactly O(log n) clusters which are labeled different
39
![Page 40: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/40.jpg)
Spiral Hierarchy
• How to find a predecessor node? Via spiral paths for each leaf node u
by visiting leaders of all the clusters that contain u from level 0 to the root level
The hierarchy guarantees:(1) For any two nodes u,v, their spiral paths p(u) and p(v) meet at level min{h, log(dist(u,v))+2}
(2) length(pi(u)) is at most O(2i log2n)40
root
up(u) p(v)
v
![Page 41: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/41.jpg)
(Canonical) downward Paths
41
root
up(u)
root
up(u)
vp(v)
p(v) is a (canonical) downward path
![Page 42: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/42.jpg)
Analysis: lookup Stretch
42
v w
vi
x Level kLevel i
O(2k log2n)
O(2i log2n)
O(2k log n)
2i
If there is no Move, a Lookup r from w finds downward path to v in level log(dist(u,v))+2 = O(i)
When there are Moves, it can be shown that r finds downward path to v in level k = O(i + log log2n)
p(w)
p(v)
C(r)/C*(r) = O(2k log2n)+O(2k log n)+O(2i log2n) / 2i-1
= O(log4n)
Canonical path
spiral path
![Page 43: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/43.jpg)
Analysis: move Stretch
43
Level Assume a sequential execution R of l+1 Move requests, where r0 is an initial Publish request.
C*(R) ≥ max1≤k≤h (Sk-1) 2k-1
C(R) ≥ log2n)
C(R)/C*(R) = log2n) / max1≤k≤h (Sk-1) 2k-1
= O(log2n. h) max1≤k≤h (Sk-1) 2k-1 / max1≤k≤h (Sk-1) 2k-1
= O(log2n. log D)
h...k...210
request
x
r0
.
.
.r0
.
.
.r0
r0
r0
r1
.
.r1
r1
r1
u v y w
r2
r2
r2
.
.r2
r2
r2
rl-1
rl-1
rl-1
r2
.
.rl
.
.
.rl
rl
rl
. . .Thus,
![Page 44: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/44.jpg)
Summary
• A distributed directory protocol Spiral for general networks that
Has poly-logarithmic stretch
Is starvation free
Avoids race conditions
Factors in the stretch are mainly due to the parameters of the hierarchical clustering
44
![Page 45: Distributed Transactional Memory for General Networks](https://reader036.vdocuments.us/reader036/viewer/2022062501/5681637d550346895dd45c8b/html5/thumbnails/45.jpg)
Thank you!!!
45