Towards Applying Machine Learning to Adaptive Transactional Memory

There is tremendous diversity among the published algorithms for implementing Transactional Memory (TM). Each of these algorithms appears to be well suited to certain workloads and architectures. However, for programs that operate in distinct phases, exhibit input-dependent behavior, or must run on many different classes of machine, the best algorithm cannot be selected before the program actually runs. We introduce a mechanism for dynamic profiling of a running transactional program, and show how the profile can be used with machine learning techniques to select a TM implementation at run-time. Our preliminary results on the STAMP benchmark suite show good performance, providing a baseline for future research into adaptivity mechanisms for TM.

[1]  François Bodin,et al.  A Machine Learning Approach to Automatic Production of Compiler Heuristics , 2002, AIMSA.

[2]  Michael F. P. O'Boyle,et al.  Method-specific dynamic compilation using logistic regression , 2006, OOPSLA '06.

[3]  Nir Shavit,et al.  TLRW: return of the read-write lock , 2010, SPAA '10.

[4]  Brad Calder,et al.  Selecting software phase markers with code structure analysis , 2006, International Symposium on Code Generation and Optimization (CGO'06).

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

[6]  Michael F. P. O'Boyle,et al.  Automatic Tuning of Inlining Heuristics , 2005, ACM/IEEE SC 2005 Conference (SC'05).

[7]  Michael F. P. O'Boyle,et al.  Using machine learning to focus iterative optimization , 2006, International Symposium on Code Generation and Optimization (CGO'06).

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

[9]  Saman P. Amarasinghe,et al.  Meta optimization: improving compiler heuristics with machine learning , 2003, PLDI '03.

[10]  Michael F. Spear Lightweight, robust adaptivity for software transactional memory , 2010, SPAA '10.

[11]  Adam Welc,et al.  Irrevocable transactions and their applications , 2008, SPAA '08.

[12]  Risto Miikkulainen,et al.  Evolving Neural Networks through Augmenting Topologies , 2002, Evolutionary Computation.

[13]  Douglas L. Jones,et al.  Fast searches for effective optimization phase sequences , 2004, PLDI '04.

[14]  Virendra J. Marathe,et al.  Adaptive Software Transactional Memory , 2005, DISC.

[15]  Adam Welc,et al.  Practical weak-atomicity semantics for java stm , 2008, SPAA '08.

[16]  Michael F. Spear,et al.  Scalable Techniques for Transparent Privatization in Software Transactional Memory , 2008, 2008 37th International Conference on Parallel Processing.

[17]  David A. Padua,et al.  A dynamically tuned sorting library , 2004, International Symposium on Code Generation and Optimization, 2004. CGO 2004..

[18]  Maged M. Michael,et al.  RingSTM: scalable transactions with a single atomic instruction , 2008, SPAA '08.

[19]  Mark Stephenson,et al.  Predicting unroll factors using supervised classification , 2005, International Symposium on Code Generation and Optimization.

[20]  James R. Larus,et al.  Transactional Memory, 2nd edition , 2010, Transactional Memory.

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

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

[23]  Michael F. P. O'Boyle,et al.  Proceedings of the GCC Developers' Summit , 2008 .

[24]  Keshav Pingali,et al.  How much parallelism is there in irregular applications? , 2009, PPoPP '09.

[25]  Albert Cohen,et al.  Iterative optimization in the polyhedral model: part ii, multidimensional time , 2008, PLDI '08.

[26]  Michael F. Spear,et al.  Toxic Transactions∗ , 2011 .

[27]  Nir Shavit,et al.  Transactional Mutex Locks , 2010, Euro-Par.

[28]  Keith D. Cooper,et al.  ACME: adaptive compilation made efficient , 2005, LCTES '05.

[29]  Mark Moir,et al.  PhTM: Phased Transactional Memory , 2007 .

[30]  Michael F. P. O'Boyle,et al.  MILEPOST GCC: machine learning based research compiler , 2008 .

[31]  Mateo Valero,et al.  Taking the heat off transactions: Dynamic selection of pessimistic concurrency control , 2009, 2009 IEEE International Symposium on Parallel & Distributed Processing.

[32]  Michael F. Spear,et al.  A comprehensive strategy for contention management in software transactional memory , 2009, PPoPP '09.

[33]  Agnar Aamodt,et al.  Case-Based Reasoning: Foundational Issues, Methodological Variations, and System Approaches , 1994, AI Commun..

[34]  James R. Larus,et al.  Transactional Memory (Synthesis Lectures on Computer Architecture) , 2007 .

[35]  Michael F. Spear,et al.  NOrec: streamlining STM by abolishing ownership records , 2010, PPoPP '10.

[36]  Manish Vachharajani,et al.  An efficient software transactional memory using commit-time invalidation , 2010, CGO '10.

[37]  Xin Yao,et al.  Evolving artificial neural networks , 1999, Proc. IEEE.

[38]  Adam Welc,et al.  Towards transactional memory semantics for C++ , 2009, SPAA '09.

[39]  David A. Padua,et al.  Optimizing sorting with genetic algorithms , 2005, International Symposium on Code Generation and Optimization.

[40]  Yannis Smaragdakis,et al.  Adaptive Locks: Combining Transactions and Locks for Efficient Concurrency , 2009, 2009 18th International Conference on Parallel Architectures and Compilation Techniques.

[41]  Adam Welc,et al.  Design and implementation of transactional constructs for C/C++ , 2008, OOPSLA '08.

[42]  Chen Ding,et al.  Locality phase prediction , 2004, ASPLOS XI.