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

Slides:



Advertisements
Similar presentations
Time-based Transactional Memory with Scalable Time Bases Torvald Riegel, Christof Fetzer, Pascal Felber Presented By: Michael Gendelman.
Advertisements

Raphael Eidenbenz Roger Wattenhofer Roger Wattenhofer Good Programming in Transactional Memory Game Theory Meets Multicore Architecture.
Hadi Goudarzi and Massoud Pedram
Thomas Moscibroda Distributed Systems Research, Redmond Onur Mutlu
IDIT KEIDAR DMITRI PERELMAN RUI FAN EuroTM 2011 Maintaining Multiple Versions in Software Transactional Memory 1.
An Approximate Truthful Mechanism for Combinatorial Auctions An Internet Mathematics paper by Aaron Archer, Christos Papadimitriou, Kunal Talwar and Éva.
ANDREW MAO, STACY WONG Regrets and Kidneys. Intro to Online Stochastic Optimization Data revealed over time Distribution of future events is known Under.
Approximating the Domatic Number Feige, Halldorsson, Kortsarz, Srinivasan ACM Symp. on Theory of Computing, pages , 2000.
Transactional Contention Management as a Non-Clairvoyant Scheduling Problem Alessia Milani [Attiya et al. PODC 06] [Attiya and Milani OPODIS 09]
Fingerprint Clustering - CPM Fingerprint Clustering with Bounded Number of Missing Values Paola Bonizzoni, Gianluca Della Vedova, Giancarlo Mauri.
Infinite Horizon Problems
Planning under Uncertainty
1 Stochastic Event Capture Using Mobile Sensors Subject to a Quality Metric Nabhendra Bisnik, Alhussein A. Abouzeid, and Volkan Isler Rensselaer Polytechnic.
Operating Systems COMP 4850/CISG 5550 Deadlock Avoidance Dr. James Money.
Online Algorithms – II Amrinder Arora Permalink:
Idit Keidar and Dmitri Perelman Technion 1 SPAA 2009.
1 Johannes Schneider Transactional Memory: How to Perform Load Adaption in a Simple And Distributed Manner Johannes Schneider David Hasenfratz Roger Wattenhofer.
1 MetaTM/TxLinux: Transactional Memory For An Operating System Hany E. Ramadan, Christopher J. Rossbach, Donald E. Porter and Owen S. Hofmann Presenter:
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Transactional contention Management as a Non- Clairvoyant Scheduling Problem Hagit Attiya, Leah Epstein, Hadas Shachnai, Tami Tamir Presented by Anastasia.
Implicit Hitting Set Problems Richard M. Karp Harvard University August 29, 2011.
Tirgul 8 Universal Hashing Remarks on Programming Exercise 1 Solution to question 2 in theoretical homework 2.
Selfishness in Transactional Memory Raphael Eidenbenz, Roger Wattenhofer Distributed Computing Group Game Theory meets Multicore Architecture.
Ant Colonies As Logistic Processes Optimizers
Efficient Estimation of Emission Probabilities in profile HMM By Virpi Ahola et al Reviewed By Alok Datar.
1 Scalable Transactional Memory Scheduling Gokarna Sharma (A joint work with Costas Busch) Louisiana State University.
Maximum Likelihood (ML), Expectation Maximization (EM)
Small Subgraphs in Random Graphs and the Power of Multiple Choices The Online Case Torsten Mütze, ETH Zürich Joint work with Reto Spöhel and Henning Thomas.
Paging for Multi-Core Shared Caches Alejandro López-Ortiz, Alejandro Salinger ITCS, January 8 th, 2012.
Asaf Cohen (joint work with Rami Atar) Department of Mathematics University of Michigan Financial Mathematics Seminar University of Michigan March 11,
Johannes PODC 2009 –1 Coloring Unstructured Wireless Multi-Hop Networks Johannes Schneider Roger Wattenhofer TexPoint fonts used in EMF. Read.
Approximation Algorithms for Stochastic Combinatorial Optimization Part I: Multistage problems Anupam Gupta Carnegie Mellon University.
Window-Based Greedy Contention Management for Transactional Memory Gokarna Sharma (LSU) Brett Estrade (Univ. of Houston) Costas Busch (LSU) 1DISC 2010.
An Algorithmic Proof of the Lopsided Lovasz Local Lemma Nick Harvey University of British Columbia Jan Vondrak IBM Almaden TexPoint fonts used in EMF.
Edge-disjoint induced subgraphs with given minimum degree Raphael Yuster 2012.
Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin.
1 Reducing Queue Lock Pessimism in Multiprocessor Schedulability Analysis Yang Chang, Robert Davis and Andy Wellings Real-time Systems Research Group University.
An algorithmic proof of the Lovasz Local Lemma via resampling oracles Jan Vondrak IBM Almaden TexPoint fonts used in EMF. Read the TexPoint manual before.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
1 Maximal Independent Set. 2 Independent Set (IS): In a graph G=(V,E), |V|=n, |E|=m, any set of nodes that are not adjacent.
1 Online algorithms Typically when we solve problems and design algorithms we assume that we know all the data a priori. However in many practical situations.
Optimistic Design 1. Guarded Methods Do something based on the fact that one or more objects have particular states  Make a set of purchases assuming.
PODC Distributed Computation of the Mode Fabian Kuhn Thomas Locher ETH Zurich, Switzerland Stefan Schmid TU Munich, Germany TexPoint fonts used in.
The Greedy Method. The Greedy Method Technique The greedy method is a general algorithm design paradigm, built on the following elements: configurations:
On the Performance of Window-Based Contention Managers for Transactional Memory Gokarna Sharma and Costas Busch Louisiana State University.
Outline Introduction Minimizing the makespan Minimizing total flowtime
1 Markov Decision Processes Infinite Horizon Problems Alan Fern * * Based in part on slides by Craig Boutilier and Daniel Weld.
Lecture 12, CS5671 Decisions, Decisions Concepts Naïve Bayesian Classification Decision Trees –General Algorithm –Refinements Accuracy Scalability –Strengths.
A Membrane Algorithm for the Min Storage problem Dipartimento di Informatica, Sistemistica e Comunicazione Università degli Studi di Milano – Bicocca WMC.
ETH Zurich – Distributed Computing Group Raphael Eidenbenz, PhD Thesis 1ETH Zurich – Distributed Computing Group PhD Thesis Raphael Eidenbenz Prof. Roger.
NP-Complete Problems Algorithm : Design & Analysis [23]
Improving the Performance Competitive Ratios of Transactional Memory Contention Managers Gokarna Sharma Costas Busch Louisiana State University, USA WTTM.
© The McGraw-Hill Companies, Inc., Chapter 12 On-Line Algorithms.
Multiple Sequence Alignment Vasileios Hatzivassiloglou University of Texas at Dallas.
11 -1 Chapter 12 On-Line Algorithms On-Line Algorithms On-line algorithms are used to solve on-line problems. The disk scheduling problem The requests.
Multi-Task Assignment for CrowdSensing in Mobile Social Network Mingjun Xiao ∗, Jie Wu†, Liusheng Huang ∗, Yunsheng Wang‡, and Cong Liu§
An algorithmic proof of the Lovasz Local Lemma via resampling oracles Jan Vondrak IBM Almaden TexPoint fonts used in EMF. Read the TexPoint manual before.
Transactional Contention Management as a Non-Clairvoyant Scheduling Problem Hagit Attiya, Alessia Milani Technion, Haifa-LABRI, University of Bordeaux.
Transactional Memory: How to Perform Load Adaption
PHyTM: Persistent Hybrid Transactional Memory
On Scheduling in Map-Reduce and Flow-Shops
TexPoint fonts used in EMF.
Objective of This Course
Uri Zwick – Tel Aviv Univ.
Gokarna Sharma Costas Busch Louisiana State University, USA
Virtual-Time Round-Robin: An O(1) Proportional Share Scheduler
Data Communication Networks
György Dósa – M. Grazia Speranza – Zsolt Tuza:
Contention Resolution with Jobs of Heterogeneous Sizes
Presentation transcript:

Window-Based Greedy Contention Management for Transactional Memory Gokarna Sharma (LSU) Brett Estrade (Univ. of Houston) Costas Busch (LSU) DISC TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AA A

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 20102

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 DISC 20103

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 logn) (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) DISC 20104

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 DISC N N M M Transactions... Threads......

Roadmap Previous TM models and problem complexity Our TM model Our algorithms and proof ideas DISC 20106

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? DISC 20107

Execution Window Model A M £ N window W – M threads with a sequence of N transactions per thread, i.e., collection of N one-shot transaction sets DISC N N M M Transactions Threads

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 DISC 20109

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 DISC N N’ Random interval 1 23N M 1 23N N M...

How it works? 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 DISC

How it works? (Contd…) DISC N M N q 1 2 [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 Makespan = (C / log(MN) + Number of frames) £ Frame Size = (C / log(MN) + N) £ Frame Size First frame of Thread 1 where T 11 executes Second frame of Thread 1 where T 12 executes

Offline-Greedy Algorithm Initialization: – Frames are of size © = £ ( ¿ ¢ ln(MN)) time steps – Each thread P i is assigned initially a random period of q i 2 [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 DISC

Offline-Greedy Algorithm (Contd…) Proof Intuition: With high probability each transaction commits in its assigned frame – Let A’ µ A denote the subset of conflicting transactions with T ij in frame F ij |A’| · log(MN) – 1, then T ij commits in frame F ij |A’| ¸ log(MN) with probability at most (1/MN) 2 Makespan: O( ¿ ¢ (C + N log(MN))) with high probability – 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 Competitive ratio: O(s + log(MN)) with high probability – Pro: Independent with any choice of C DISC

Online-Greedy Algorithm Online in the sense that it does not depend on knowing the dependency graph to resolve conflicts Similar to Offline-Greedy except the conflict resolution strategy Priority assignment – Two different priorities associated with each transaction as a vector h π (1), π (2) i – π (1) represent the Boolean priority as in Offline-Greedy – π (2) 2 [1, M] represent random priorities: A transaction chooses π (2) uniformly at random on the start of frame F ij and after every abort [Idea from Schneider & Wattenhofer, ISAAC’09] Conflict resolution – On conflict of T ij with T kl : if π ij (2) < π kl (2) then abort(T ij, T kl ) otherwise abort(T kl, T ij ) DISC

Online-Greedy Algorithm (Contd…) Proof Intuition: frame duration is now £ ’=O( ¿ ¢ log 2 (MN)) – Analysis is similar to Offline-Greedy Makespan: O( ¿ ¢ (C log(MN) + N log 2 (MN))) with high probability – Pro: no need to know dependency graph to resolve conflicts – Con: makespan is worse in comparison to Offline-Greedy Competitive ratio: O(s ¢ log(MN) + log 2 (MN))) with high probability Pro: Independent of the contention measure C 16DISC 2010

Adaptive-Greedy Algorithm Limitations of Offline-Greedy and Online-Greedy algorithms – The values of C i need to be known in advance Adaptive-Greedy: each thread starts with guessing C i = 1 – Similar to the exponential back-off strategy used by Polka – Based on current C i estimate, the thread attempts to execute Online-Greedy algorithm – If a thread P i is unable to commit transactions (bad event) then P i assumes choice of C i is incorrect and starts over again by assuming C i ’ = 2 ¢ C i for remaining transactions Correct choice of C i is reached in logC i iterations DISC

Discussions For variable length transactions – ¿ 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 Future extensions – 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 DISC

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 DISC