Window-based greedy contention management for transactional memory: theory and practice

We consider greedy contention managers for transactional memory for M × N execution windows of transactions with M threads and N transactions per thread. We present, formally analyze, and experimentally evaluate three new randomized greedy contention management algorithms for transaction windows. Assuming that each transaction has duration τ and conflicts with at most C other transactions inside the window, the first algorithm Offline-Greedy produces a schedule of length O(τ· (C + N· log(MN))) with high probability. The offline algorithm depends on knowing the conflict graph which evolves while the execution of the transactions progresses. The second algorithm Online-Greedy produces a schedule of length that is only a logarithmic factor worse than Offline-Greedy, but does not require knowledge of the conflict graph. The third algorithm Adaptive-Greedy is the adaptive version of the previous algorithms which produces a schedule of length asymptotically the same as with online algorithm by adaptively guessing the value of C. All of the algorithms exhibit competitive ratio very close to O(s), where s is the number of shared resources, and at the same time, our algorithms provide new non-trivial tradeoffs for greedy transaction scheduling that parameterize window sizes and transaction conflicts within the execution window. We evaluate these window-based algorithms experimentally using the sorted link list, red-black tree, skip list, and vacation benchmarks. The evaluation results confirm their benefits in practical performance throughput and other metrics such as aborts per commit ratio and execution time overhead, along with the non-trivial provable properties of the algorithms.

[1]  William Pugh,et al.  Skip Lists: A Probabilistic Alternative to Balanced Trees , 1989, WADS.

[2]  Rachid Guerraoui,et al.  Toward a theory of transactional contention managers , 2005, PODC '05.

[3]  Hagit Attiya,et al.  Transactional Contention Management as a Non-Clairvoyant Scheduling Problem , 2010, Algorithmica.

[4]  James R. Goodman,et al.  Transactional lock-free execution of lock-based programs , 2002, ASPLOS X.

[5]  Maurice Herlihy,et al.  Obstruction-free synchronization: double-ended queues as an example , 2003, 23rd International Conference on Distributed Computing Systems, 2003. Proceedings..

[6]  Maurice Herlihy,et al.  Robust Contention Management in Software Transactional Memory , 2005, OOPSLA 2005.

[7]  Maurice Herlihy,et al.  Software transactional memory for dynamic-sized data structures , 2003, PODC '03.

[8]  Gokarna Sharma,et al.  On the Performance of Window-Based Contention Managers for Transactional Memory , 2011, 2011 IEEE International Symposium on Parallel and Distributed Processing Workshops and Phd Forum.

[9]  Kunle Olukotun,et al.  Transactional coherence and consistency: simplifying parallel hardware and software , 2004, IEEE Micro.

[10]  Maurice Herlihy,et al.  A flexible framework for implementing software transactional memory , 2006, OOPSLA '06.

[11]  Rajeev Motwani,et al.  Non-clairvoyant scheduling , 1994, SODA '93.

[12]  Kunle Olukotun,et al.  STAMP: Stanford Transactional Applications for Multi-Processing , 2008, 2008 IEEE International Symposium on Workload Characterization.

[13]  Edward G. Coffman,et al.  Mutual Exclusion Scheduling , 1996, Theor. Comput. Sci..

[14]  William N. Scherer,et al.  Advanced contention management for dynamic software transactional memory , 2005, PODC '05.

[15]  Dana Ron,et al.  Scheduling with conflicts: online and offline algorithms , 2009, J. Sched..

[16]  Roger Wattenhofer,et al.  Bounds on Contention Management Algorithms , 2009, ISAAC.

[17]  Simon L. Peyton Jones,et al.  Composable memory transactions , 2005, CACM.

[18]  Mark Moir,et al.  Hybrid transactional memory , 2006, ASPLOS XII.

[19]  Kunle Olukotun,et al.  An effective hybrid transactional memory system with strong isolation guarantees , 2007, ISCA '07.

[20]  Rachid Guerraoui,et al.  Polymorphic Contention Management , 2005, DISC.

[21]  Michael E. Saks,et al.  A dining philosophers algorithm with polynomial response time , 1990, Proceedings [1990] 31st Annual Symposium on Foundations of Computer Science.

[22]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[23]  Keir Fraser,et al.  Language support for lightweight transactions , 2003, SIGP.

[24]  Jan Vitek,et al.  STMBench7: a benchmark for software transactional memory , 2007, EuroSys '07.

[25]  Hsien-Hsin S. Lee,et al.  Adaptive transaction scheduling for transactional memory systems , 2008, SPAA '08.

[26]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[27]  Nir Shavit,et al.  Transactional Locking II , 2006, DISC.

[28]  David Eisenstat,et al.  Lowering the Overhead of Software Transactional Memory , 2006 .

[29]  Ronald L. Graham,et al.  Bounds for Multiprocessor Scheduling with Resource Constraints , 1975, SIAM J. Comput..

[30]  Bruce M. Maggs,et al.  Packet routing and job-shop scheduling inO(congestion+dilation) steps , 1994, Comb..

[31]  Subhash Khot,et al.  Improved inapproximability results for MaxClique, chromatic number and approximate graph coloring , 2001, Proceedings 2001 IEEE International Conference on Cluster Computing.

[32]  Torvald Riegel,et al.  Dynamic performance tuning of word-based software transactional memory , 2008, PPoPP.

[33]  Donald E. Porter,et al.  MetaTM/TxLinux: Transactional Memory for an Operating System , 2007, IEEE Micro.

[34]  Nir Shavit,et al.  Software transactional memory , 1995, PODC '95.

[35]  Guy Kortsarz,et al.  Multicoloring trees , 2003, Inf. Comput..

[36]  Danny Hendler,et al.  CAR-STM: scheduling-based collision avoidance and resolution for software transactional memory , 2008, PODC '08.

[37]  Hagit Attiya,et al.  Transactional scheduling for read-dominated workloads , 2009, J. Parallel Distributed Comput..

[38]  Sandy Irani,et al.  Scheduling with conflicts, and applications to traffic signal control , 1996, SODA '96.

[39]  Klaus Jansen,et al.  Restrictions of Graph Partition Problems. Part I , 1995, Theor. Comput. Sci..

[40]  Mikel Luján,et al.  Steal-on-Abort: Improving Transactional Memory Performance through Dynamic Transaction Reordering , 2008, HiPEAC.

[41]  Philip Heidelberger,et al.  Multiple reservations and the Oklahoma update , 1993, IEEE Parallel & Distributed Technology: Systems & Applications.

[42]  Mikel Luján,et al.  On the Performance of Contention Managers for Complex Transactional Memory Benchmarks , 2009, 2009 Eighth International Symposium on Parallel and Distributed Computing.

[43]  William N. Scherer,et al.  Contention Management in Dynamic Software Transactional Memory ∗ , 2004 .

[44]  Gokarna Sharma,et al.  Window-Based Greedy Contention Management for Transactional Memory , 2010, DISC.

[45]  Michael Luby,et al.  A simple parallel algorithm for the maximal independent set problem , 1985, STOC '85.

[46]  Rachid Guerraoui,et al.  Preventing versus curing: avoiding conflicts in transactional memories , 2009, PODC '09.

[47]  David Hasenfratz,et al.  Transactional Memory: How to perform load adaption in a simple and distributed manner , 2010, 2010 International Conference on High Performance Computing & Simulation.