Leveraging parallel nesting in transactional memory

Exploiting the emerging reality of affordable multi-core architectures goes through providing programmers with simple abstractions that would enable them to easily turn their sequential programs into concurrent ones that expose as much parallelism as possible. While transactional memory promises to make concurrent programming easy to a wide programmer community, current implementations either disallow nested transactions to run in parallel or do not scale to arbitrary parallel nesting depths. This is an important obstacle to the central goal of transactional memory, as programmers can only start parallel threads in restricted parts of their code. This paper addresses the intrinsic difficulty behind the support for parallel nesting in transactional memory, and proposes a novel solution that, to the best of our knowledge, is the first practical solution to meet the lowest theoretical upper bound known for the problem. Using a synthetic workload configured to test parallel transactions on a multi-core machine, a practical implementation of our algorithm yields substantial speed-ups (up to 22x with 33 threads) relatively to serial nesting, and shows that the time to start and commit transactions, as well as to detect conflicts, is independent of nesting depth.

[1]  Kunle Olukotun,et al.  The Atomos transactional programming language , 2006, PLDI '06.

[2]  Bradley C. Kuszmaul,et al.  Cilk: an efficient multithreaded runtime system , 1995, PPOPP '95.

[3]  LamportLeslie Time, clocks, and the ordering of events in a distributed system , 1978 .

[4]  Bratin Saha,et al.  Open nesting in software transactional memory , 2007, PPOPP.

[5]  Leslie Lamport,et al.  Time, clocks, and the ordering of events in a distributed system , 1978, CACM.

[6]  David A. Wood,et al.  Supporting nested transactional memory in logTM , 2006, ASPLOS XII.

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

[8]  Rachid Guerraoui A Smooth Concurrency Revolution with Free Objects , 2007, IEEE Internet Computing.

[9]  Adam Welc,et al.  NePaLTM: Design and Implementation of Nested Parallelism for Transactional Memory Systems , 2009, ECOOP.

[10]  Emmett Witchel,et al.  The Xfork in the Road to Coordinated Sibling Transactions , 2009 .

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

[12]  Jeremy T. Fineman,et al.  Nested parallelism in transactional memory , 2008, PPoPP.

[13]  Tatiana Shpeisman,et al.  Nesting in Software Transactional Memory , 2007 .

[14]  Eduard Ayguadé,et al.  Atomic quake: using transactional memory in an interactive multiplayer game server , 2009, PPoPP '09.

[15]  C. Kozyrakis,et al.  Parallelizing SPECjbb 2000 with Transactional Memory , 2006 .

[16]  Michael Isard,et al.  Automatic Mutual Exclusion , 2007, HotOS.

[17]  Adam Welc,et al.  NePalTM: design and implementation of nested parallelism for transactional memory systems , 2009, PPoPP '09.

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