Thread-Level Transactional Memory Decoupling Interface and Implementation UW Computer Architecture Affiliates Conference Kevin Moore October 21, 2004.

Slides:



Advertisements
Similar presentations
Copyright 2008 Sun Microsystems, Inc Better Expressiveness for HTM using Split Hardware Transactions Yossi Lev Brown University & Sun Microsystems Laboratories.
Advertisements

Remus: High Availability via Asynchronous Virtual Machine Replication
Maurice Herlihy (DEC), J. Eliot & B. Moss (UMass)
Transactional Memory Supporting Large Transactions Anvesh Komuravelli Abe Othman Kanat Tangwongsan Hardware-based.
Department of Computer Science iGPU: Exception Support and Speculative Execution on GPUs Jaikrishnan Menon, Marc de Kruijf Karthikeyan Sankaralingam Vertical.
EECS 470 Virtual Memory Lecture 15. Why Use Virtual Memory? Decouples size of physical memory from programmer visible virtual memory Provides a convenient.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Using DSVM to Implement a Distributed File System Ramon Lawrence Dept. of Computer Science
Transactional Memory Overview Olatunji Ruwase Fall 2007 Oct
Transactional Memory (TM) Evan Jolley EE 6633 December 7, 2012.
Chapter 4: Threads. Overview Multithreading Models Threading Issues Pthreads Windows XP Threads.
PARALLEL PROGRAMMING with TRANSACTIONAL MEMORY Pratibha Kona.
1 Lecture 21: Transactional Memory Topics: consistency model recap, introduction to transactional memory.
Recovery 10/18/05. Implementing atomicity Note, when a transaction commits, the portion of the system implementing durability ensures the transaction’s.
October 2003 What Does the Future Hold for Parallel Languages A Computer Architect’s Perspective Josep Torrellas University of Illinois
CS 7810 Lecture 19 Coherence Decoupling: Making Use of Incoherence J.Huh, J. Chang, D. Burger, G. Sohi Proceedings of ASPLOS-XI October 2004.
[ 1 ] Agenda Overview of transactional memory (now) Two talks on challenges of transactional memory Rebuttals/panel discussion.
1 Lecture 23: Transactional Memory Topics: consistency model recap, introduction to transactional memory.
Supporting Nested Transactional Memory in LogTM Authors Michelle J Moravan Mark Hill Jayaram Bobba Ben Liblit Kevin Moore Michael Swift Luke Yen David.
Transaction Processing IS698 Min Song. 2 What is a Transaction?  When an event in the real world changes the state of the enterprise, a transaction is.
Chapter 8 : Transaction Management. u Function and importance of transactions. u Properties of transactions. u Concurrency Control – Meaning of serializability.
Unbounded Transactional Memory Paper by Ananian et al. of MIT CSAIL Presented by Daniel.
Transaction Management WXES 2103 Database. Content What is transaction Transaction properties Transaction management with SQL Transaction log DBMS Transaction.
1 Threads Chapter 4 Reading: 4.1,4.4, Process Characteristics l Unit of resource ownership - process is allocated: n a virtual address space to.
Highly Available ACID Memory Vijayshankar Raman. Introduction §Why ACID memory? l non-database apps: want updates to critical data to be atomic and persistent.
Selecting and Implementing An Embedded Database System Presented by Jeff Webb March 2005 Article written by Michael Olson IEEE Software, 2000.
Chapter 3 Memory Management: Virtual Memory
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
Distributed Shared Memory: A Survey of Issues and Algorithms B,. Nitzberg and V. Lo University of Oregon.
Transactional Memory CDA6159. Outline Introduction Paper 1: Architectural Support for Lock-Free Data Structures (Maurice Herlihy, ISCA ‘93) Paper 2: Transactional.
Cosc 4740 Chapter 6, Part 3 Process Synchronization.
Fast Multi-Threading on Shared Memory Multi-Processors Joseph Cordina B.Sc. Computer Science and Physics Year IV.
Sutirtha Sanyal (Barcelona Supercomputing Center, Barcelona) Accelerating Hardware Transactional Memory (HTM) with Dynamic Filtering of Privatized Data.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
SafetyNet: improving the availability of shared memory multiprocessors with global checkpoint/recovery Daniel J. Sorin, Milo M. K. Martin, Mark D. Hill,
SafetyNet Improving the Availability of Shared Memory Multiprocessors with Global Checkpoint/Recovery Daniel J. Sorin, Milo M. K. Martin, Mark D. Hill,
Operating Systems CSE 411 Multi-processor Operating Systems Multi-processor Operating Systems Dec Lecture 30 Instructor: Bhuvan Urgaonkar.
Hybrid Transactional Memory Sanjeev Kumar, Michael Chu, Christopher Hughes, Partha Kundu, Anthony Nguyen, Intel Labs University of Michigan Intel Labs.
A summary by Nick Rayner for PSU CS533, Spring 2006
Shared Memory Consistency Models. SMP systems support shared memory abstraction: all processors see the whole memory and can perform memory operations.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
Concurrency unlocked Programming
Software Transactional Memory Should Not Be Obstruction-Free Robert Ennals Presented by Abdulai Sei.
Coupling Facility. The S/390 Coupling Facility (CF), the key component of the Parallel Sysplex cluster, enables multisystem coordination and datasharing.
OpenMP for Networks of SMPs Y. Charlie Hu, Honghui Lu, Alan L. Cox, Willy Zwaenepoel ECE1747 – Parallel Programming Vicky Tsang.
Transactional Memory Coherence and Consistency Lance Hammond, Vicky Wong, Mike Chen, Brian D. Carlstrom, John D. Davis, Ben Hertzberg, Manohar K. Prabhu,
4 November 2005 CS 838 Presentation 1 Nested Transactional Memory: Model and Preliminary Sketches J. Eliot B. Moss and Antony L. Hosking Presented by:
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Introduction to Operating Systems Concepts
Maurice Herlihy and J. Eliot B. Moss,  ISCA '93
Chapter 4: Threads.
Speculative Lock Elision
The Mach System Sri Ramkrishna.
Virtualizing Transactional Memory
Transactional Memory : Hardware Proposals Overview
PHyTM: Persistent Hybrid Transactional Memory
Two Ideas of This Paper Using Permissions-only Cache to deduce the rate at which less-efficient overflow handling mechanisms are invoked. When the overflow.
Transactional Memory Coherence and Consistency
Chapter 4: Threads.
Changing thread semantics
Chapter 2: System Structures
Lecture 6: Transactions
Chapter 10 Transaction Management and Concurrency Control
Transactional Memory An Overview of Hardware Alternatives
Lecture 22: Consistency Models, TM
Threads Chapter 4.
Hybrid Transactional Memory
Lecture 23: Transactional Memory
Chapter 4: Threads.
University of Wisconsin-Madison Presented by: Nick Kirchem
Presentation transcript:

Thread-Level Transactional Memory Decoupling Interface and Implementation UW Computer Architecture Affiliates Conference Kevin Moore October 21, 2004

Thread-Level Transactional Memory2 Transactional Memory Atomic and isolated execution Replace locks for critical sections No lock granularity problem Software Error Recovery Allow programmers to abort/rollback transactions when errors are detected Convenient interface for exception handling

October 21, 2004Thread-Level Transactional Memory3 Why Haven’t You Built It? ISA Change No immediate benefit Complexity No solution for large transactions No solution for software error recovery

October 21, 2004Thread-Level Transactional Memory4 The Interface Matters Many systems implement the same ISA Support multiple design points Survive technology changes Programmability is the key motivation for transactional memory Interface challenge Modern processors support small (few memory operations) easily Unlimited transactions are more convenient for software

October 21, 2004Thread-Level Transactional Memory5 Virtualize Transactional Memory Decouple interface and implementation Allow arbitrary size transactions Don’t require unlimited buffering Flexible implementation Multiple cost/performance options Support software error recovery Recover all transactions

October 21, 2004Thread-Level Transactional Memory6 Overview Motivation Background TLTM Interface Out-of-Cache Transactions Conclusion

October 21, 2004Thread-Level Transactional Memory7 Prior Transactional Memory Systems Transactional Memory Transactional Memory Coherence and Consistency Oklahoma Update Transactional Lock Removal 801 Storage (Database Storage)

October 21, 2004Thread-Level Transactional Memory8 Transactional Memory Herlihy and Moss, ISCA 1993 Replaced short critical sections with atomic transactions More efficient than locks Implementation based on cache coherence states

October 21, 2004Thread-Level Transactional Memory9 Herlihy and Moss, ISCA 1993 Transaction cache Stores all data accessed by transactions 2 copies of each updated cache line Fully associative Acts as a victim cache Long Locks Processors are allowed to refuse coherence requests M S S XCommit XAbort CacheTransaction Cache CPU Memory

October 21, 2004Thread-Level Transactional Memory10 Transactional Memory Coherence and Consistency TCC combines coherence and transaction support All memory requests are part of some transaction Designed for a single CMP Relies on broadcast

October 21, 2004Thread-Level Transactional Memory11 TCC Each processor executes a speculative (optimistic) transaction Commits are serial Broadcasts addresses of all updates in the transaction Supports long-running (large) transactions Must grab (and hold) commit permission first Cannot abort large transactions

October 21, 2004Thread-Level Transactional Memory12 TCC CPU L1 D L2 Cache Logically Shared Write buffer ~4 kB, Fully-Associative On-Chip Interconnect Broadcast-Based Communication

October 21, 2004Thread-Level Transactional Memory13 Limits of Prior Proposals No separation between implementation and interface No concurrent execution of large transactions No software error recovery Don’t address operating system

October 21, 2004Thread-Level Transactional Memory14 Thread-Level Transactional Memory (TLTM) Decouple transactional interface and implementation No limit on transaction size or content Break the dependence on caching all data accessed in a transaction

October 21, 2004Thread-Level Transactional Memory15 TLTM API Transactions Specified by begin and commit operations All memory operations between begin and commit are part of the transaction Transactions end in a commit or an abort Abort/Recovery Can be triggered by software or hardware Control may be passed to software abort handler If software handler is called, a before-image log is provided in the memory space of the process

October 21, 2004Thread-Level Transactional Memory16 TLTM Guarantee 1) Execute the transaction atomically (and commit) or, 2) Allow a software abort handler to run before any updates are exposed For each transaction the hardware will:

October 21, 2004Thread-Level Transactional Memory17 Transactional Memory Requirements Maintain multiple versions of updated objects Track data set (reads and updates) Rollback/Restart

October 21, 2004Thread-Level Transactional Memory18 Thread-Level Log Stack Log Thread 0 Stack Log Thread n … Code Data Heap Global

October 21, 2004Thread-Level Transactional Memory19 Log-Based Recovery Undo log Before image log stored in virtual address space of user program Separate log for each thread Aborts can be handled in software Replays log entries in LIFO order Breaks dependence on cache for 2 nd copy

October 21, 2004Thread-Level Transactional Memory20 Speculative Transactions ULTM does not require logging Processors can still execute transactions speculatively Non-speculative transactions will be rare for many applications

October 21, 2004Thread-Level Transactional Memory21 Transaction Read Set Size

October 21, 2004Thread-Level Transactional Memory22 Transaction Write Set Size

October 21, 2004Thread-Level Transactional Memory23 Tracking Transaction State Use conservative estimate of transaction data sets Allows bounded state Allows a trade-off between space overhead and performance Results in some unnecessary aborts

October 21, 2004Thread-Level Transactional Memory24 Advantages of TLTM Flexibility for programmers No hardware-imposed limits on transaction content Allows conservative synchronization Supports recovery for all transactions Flexibility for memory system designers No minimum size or associativity requirement for caches, reorder buffers or store queues Can off-load recovery to software