Compiler and runtime support for efficient software transactional memory

AR Adl-Tabatabai, BT Lewis, V Menon… - ACM SIGPLAN …, 2006 - dl.acm.org
AR Adl-Tabatabai, BT Lewis, V Menon, BR Murphy, B Saha, T Shpeisman
ACM SIGPLAN Notices, 2006dl.acm.org
Programmers have traditionally used locks to synchronize concurrent access to shared data.
Lock-based synchronization, however, has well-known pitfalls: using locks for fine-grain
synchronization and composing code that already uses locks are both difficult and prone to
deadlock. Transactional memory provides an alternate concurrency control mechanism that
avoids these pitfalls and significantly eases concurrent programming. Transactional memory
language constructs have recently been proposed as extensions to existing languages or …
Programmers have traditionally used locks to synchronize concurrent access to shared data. Lock-based synchronization, however, has well-known pitfalls: using locks for fine-grain synchronization and composing code that already uses locks are both difficult and prone to deadlock. Transactional memory provides an alternate concurrency control mechanism that avoids these pitfalls and significantly eases concurrent programming. Transactional memory language constructs have recently been proposed as extensions to existing languages or included in new concurrent language specifications, opening the door for new compiler optimizations that target the overheads of transactional memory.This paper presents compiler and runtime optimizations for transactional memory language constructs. We present a high-performance software transactional memory system (STM) integrated into a managed runtime environment. Our system efficiently implements nested transactions that support both composition of transactions and partial roll back. Our JIT compiler is the first to optimize the overheads of STM, and we show novel techniques for enabling JIT optimizations on STM operations. We measure the performance of our optimizations on a 16-way SMP running multi-threaded transactional workloads. Our results show that these techniques enable transactional memory's performance to compete with that of well-tuned synchronization.
ACM Digital Library