Window-Based Greedy Contention Management for Transactional Memory
Gokarna Sharma (LSU) Brett Estrade (Univ. of Houston) Costas Busch (LSU)
1 DISC 2010 - 24th International Symposium on Distributed Computing
Window-Based Greedy Contention Management for Transactional Memory - - PowerPoint PPT Presentation
Window-Based Greedy Contention Management for Transactional Memory Gokarna Sharma ( LSU ) Brett Estrade ( Univ. of Houston ) Costas Busch ( LSU ) 1 DISC 2010 - 24th International Symposium on Distributed Computing Transactional Memory -
1 DISC 2010 - 24th International Symposium on Distributed Computing
DISC 2010 - 24th International Symposium on Distributed Computing 2
3 DISC 2010 - 24th International Symposium on Distributed Computing
– [Guerraoui et al., PODC’05]
– [Attiya et al., PODC’06]
– [Schneider & Wattenhofer, ISAAC’09]
transactions and n is the number of transactions)
– [Attiya & Milani, OPODIS’09]
4 DISC 2010 - 24th International Symposium on Distributed Computing
5
1 2 3 N
N M
1 2 3 M
Transactions
. . .
Threads . . .
DISC 2010 - 24th International Symposium on Distributed Computing
6 DISC 2010 - 24th International Symposium on Distributed Computing
– n transactions, a single transaction per thread – Best bound proven to be achievable is O(s)
– Coloring problem -> One-shot scheduling problem -> One-shot scheduling Solution -> Coloring Solution
7 DISC 2010 - 24th International Symposium on Distributed Computing
8
1 2 3 N N M
1 2 3 M Transactions
. . . . . .
Threads
DISC 2010 - 24th International Symposium on Distributed Computing
transaction inside the window
– Straightforward upper bound: τ . min(CN,MN), where τ is the execution time duration – One-shot analysis bound [Attiya et al., PODC’06]: O(sN) – Using RandomizedRounds [Schneider & Wattenhofer, ISAAC’09] N times, makespan bound: O(τ . CN logM)
– Offline-Greedy: Makespan bound = O(τ . (C + N log(MN))) and
Competitive Ratio = O(s + log(MN)) with high probability
– Online-Greedy: Makespan bound = O(τ . (C log(MN) + N log2(MN))) and
Competitive Ratio = O(s . log(MN) + log2(MN)) high probability
9 DISC 2010 - 24th International Symposium on Distributed Computing
execution time may not coincide
transactions and less frequent in different column transactions
10
N N’
Random interval
1 2 3 N M 1 2 3 N N M . . .
DISC 2010 - 24th International Symposium on Distributed Computing
removed)
– Frame size depends on the conflict resolution strategy of the algorithm
11 DISC 2010 - 24th International Symposium on Distributed Computing
12
1 2 3 N M N q1 ϵ [0, α1 -1], α1 = C1 / log(MN)
Frames C=maxi Ci, 1 ≤ i ≤ M
F11 F3N
Thread 1 Thread 2 Thread 3 Thread M
F1N F12
Makespan = (C / log(MN) + Number of frames) × Frame Size = (C / log(MN) + N) × Frame Size First frame of Thread 1 where T11 executes Second frame of Thread 1 where T12 executes
DISC 2010 - 24th International Symposium on Distributed Computing
– Frames are of size Φ = Θ(τ . ln(MN)) time steps – Each thread Pi is assigned initially a random period of qi ϵ [0, αi-1] frames, αi = Ci / log(MN) – Each transaction Tij is assigned to frame Fij = qi + (j-1)
– Transaction Tij is initially in low priority – Tij switches to high priority in the first time step of frame Fij and remains in high priority thereafter
– Conflict graph is dynamic and evolves while the execution of the transactions progresses
13 DISC 2010 - 24th International Symposium on Distributed Computing
– Let A’ ⊆ A denote the subset of conflicting transactions with Tij in frame Fij
2
– Pro: For C ≤ N log(MN) makespan is log(MN) factor far from optimal, since N is a trivial lower bound – Con: Need to know dependency graph to resolve conflicts
– Pro: Independent with any choice of C
14 DISC 2010 - 24th International Symposium on Distributed Computing
– Two different priorities associated with each transaction as a vector π(1), π(2) – π(1) represent the Boolean priority as in Offline-Greedy – π(2) ∈ [1, M] represent random priorities: A transaction chooses π(2) uniformly at random on the start of frame Fij and after every abort [Idea
from Schneider & Wattenhofer, ISAAC’09]
– On conflict of Tij with Tkl: if πij
(2) < πkl (2) then abort(Tij, Tkl) otherwise
abort(Tkl, Tij)
15 DISC 2010 - 24th International Symposium on Distributed Computing
– Analysis is similar to Offline-Greedy
2(MN)) with high
16 DISC 2010 - 24th International Symposium on Distributed Computing
– Similar to the exponential back-off strategy used by Polka – Based on current Ci estimate, the thread attempts to execute Online-Greedy algorithm – If a thread Pi is unable to commit transactions (bad event) then Pi assumes choice of Ci is incorrect and starts over again by assuming Ci’ = 2 ⋅ Ci for remaining transactions
17 DISC 2010 - 24th International Symposium on Distributed Computing
– 𝜐 on makespan bounds is replaced with 𝜐max, which is the maximum duration of any transaction in the window – 𝜐max / 𝜐min factor in competitive ratio bounds, where 𝜐min is the minimum duration of any transaction in the window
– Instead of one randomization interval at the beginning of window, random periods of low priority between subsequent transactions – Dynamic expansion and contraction of the execution window to preserve the contention measure C
18 DISC 2010 - 24th International Symposium on Distributed Computing
19 DISC 2010 - 24th International Symposium on Distributed Computing