Presentation is loading. Please wait.

Presentation is loading. Please wait.

Window-Based Greedy Contention Management for Transactional Memory Gokarna Sharma (LSU) Brett Estrade (Univ. of Houston) Costas Busch (LSU) 1DISC 2010.

Similar presentations


Presentation on theme: "Window-Based Greedy Contention Management for Transactional Memory Gokarna Sharma (LSU) Brett Estrade (Univ. of Houston) Costas Busch (LSU) 1DISC 2010."— Presentation transcript:

1 Window-Based Greedy Contention Management for Transactional Memory Gokarna Sharma (LSU) Brett Estrade (Univ. of Houston) Costas Busch (LSU) 1DISC 2010 - 24th International Symposium on Distributed Computing

2 Transactional Memory - Background The emergence of multi-core architectures – Opportunities and challenges How to handle access to shared data? – Locks, Monitors, … Transactional memory (TM) is an alternative synchronization abstraction – Simple, composable, … Three types – Hardware, Software, and Hybrid TMs – Our focus is on STM Systems DISC 2010 - 24th International Symposium on Distributed Computing2

3 STM Systems Progress is ensured through contention management (CM) policy If transactions modify different data – everything is OK If transactions modify same data – conflicts arise that must be resolved - job of a contention management policy Of particular interest are greedy contention managers – Transactions immediately restart after every abort 3DISC 2010 - 24th International Symposium on Distributed Computing

4 Prior Work Mostly empirical evaluation Theoretical Analysis – [Guerraoui et al., PODC’05] Greedy Contention Manager Competitive ratio = O(s 2 ) (s is the number of shared resources) – [Attiya et al., PODC’06] Improved to O(s) – [Schneider & Wattenhofer, ISAAC’09] RandomizedRounds Contention Manager Competitive ratio = O(C. log n) (C is the maximum number of conflicting transactions and n is the number of transactions) – [Attiya & Milani, OPODIS’09] Bimodal Scheduler Competitive ratio = O(s) (for bimodal workload with equi-length transactions) 4DISC 2010 - 24th International Symposium on Distributed Computing

5 Our Contributions Execution window model for TM Makespan bound of any CM algorithm based on the contention measure C with in the window and the window parameters M and N Two new randomized contention management algorithms that are very close to O(s)-competitive An adaptive version that adapts to the amount of contention C 5 1 23N N M 1 2 3 M Transactions... Threads...... DISC 2010 - 24th International Symposium on Distributed Computing

6 Roadmap Previous TM models and problem complexity Our TM model Our algorithms and proof ideas 6DISC 2010 - 24th International Symposium on Distributed Computing

7 Previous TM Models One-shot scheduling problem – n transactions, a single transaction per thread – Best bound proven to be achievable is O(s) Problem Complexity: directly related to vertex coloring – Coloring problem -> One-shot scheduling problem -> One-shot scheduling Solution -> Coloring Solution NP-Hard to approximate an optimal vertex coloring Can we do better under the limitations of coloring reduction? 7DISC 2010 - 24th International Symposium on Distributed Computing

8 Execution Window Model 8 1 23N N M 1 2 3 M Transactions......... Threads DISC 2010 - 24th International Symposium on Distributed Computing

9 Makespan Bounds Let C denote the maximum number of conflicting transactions for any transaction inside the window Trivial Makespan Bounds: – 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) Our Bounds: – 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 log 2 (MN))) and Competitive Ratio = O(s. log(MN) + log 2 (MN)) high probability 9DISC 2010 - 24th International Symposium on Distributed Computing

10 Intuition The random delays help conflicting transactions shift inside the window and their execution time may not coincide More apparent in scenarios where conflicts are more frequent inside the same column transactions and less frequent in different column transactions 10 N N’ Random interval 1 23N M 1 23N N M... DISC 2010 - 24th International Symposium on Distributed Computing

11 How it works? (1/2) Random intervals: Assume each thread P i knows C i and each transaction has same duration τ (this assumption can be removed) Conflicts: Divide time steps into frames [each time step is of size τ] – Frame size depends on the conflict resolution strategy of the algorithm Number of frames in random intervals: Each thread chooses a random number q i independently, uniformly, and randomly from the range [0, α i -1], where α i = C i / log(MN) Handling conflicts: Use priorities 11DISC 2010 - 24th International Symposium on Distributed Computing

12 How it works? (2/2) 12 1 23N M N q 1 ϵ [0, α 1 -1], α 1 = C 1 / log(MN) Frames C=max i C i, 1 ≤ i ≤ M F 11 F 3N Thread 1 Thread 2 Thread 3 Thread M F 1N F 12 First frame of Thread 1 where T 11 executes Second frame of Thread 1 where T 12 executes DISC 2010 - 24th International Symposium on Distributed Computing

13 Offline-Greedy Algorithm (1/2) Initialization: – Frames are of size Φ = Θ(τ. ln(MN)) time steps – Each thread P i is assigned initially a random period of q i ϵ [0, α i -1] frames, α i = C i / log(MN) – Each transaction T ij is assigned to frame F ij = q i + (j-1) Priority assignment: each transaction has two priorities: low or high – Transaction T ij is initially in low priority – T ij switches to high priority in the first time step of frame F ij and remains in high priority thereafter Conflict resolution: uses conflict graph explicitly to resolve conflicts – Conflict graph is dynamic and evolves while the execution of the transactions progresses 13DISC 2010 - 24th International Symposium on Distributed Computing

14 Offline-Greedy Algorithm (2/2) 14 DISC 2010 - 24th International Symposium on Distributed Computing

15 Online-Greedy Algorithm (1/2) 15DISC 2010 - 24th International Symposium on Distributed Computing

16 Online-Greedy Algorithm (2/2) 16DISC 2010 - 24th International Symposium on Distributed Computing

17 Adaptive-Greedy Algorithm 17DISC 2010 - 24th International Symposium on Distributed Computing

18 Discussions 18DISC 2010 - 24th International Symposium on Distributed Computing

19 Conclusions Execution window model for TM Two new randomized greedy CM algorithms that are very close to O(s)-competitive Adaptive version of the previous algorithms for better performance by avoiding the limitations of the known value of C 19DISC 2010 - 24th International Symposium on Distributed Computing


Download ppt "Window-Based Greedy Contention Management for Transactional Memory Gokarna Sharma (LSU) Brett Estrade (Univ. of Houston) Costas Busch (LSU) 1DISC 2010."

Similar presentations


Ads by Google