Supporting Nested Transactional Memory in LogTM Authors Michelle J Moravan Mark Hill Jayaram Bobba Ben Liblit Kevin Moore Michael Swift Luke Yen David.

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

9.4 Page Replacement What if there is no free frame?
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Chapter 16.
1 Lecture 18: Transactional Memories II Papers: LogTM: Log-Based Transactional Memory, HPCA’06, Wisconsin LogTM-SE: Decoupling Hardware Transactional Memory.
Monitoring Data Structures Using Hardware Transactional Memory Shakeel Butt 1, Vinod Ganapathy 1, Arati Baliga 2 and Mihai Christodorescu 3 1 Rutgers University,
© 2006 Mulitfacet ProjectUniversity of Wisconsin-Madison Supporting Nested Transactional Memory in LogTM Michelle J. Moravan, Jayaram Bobba, Kevin E. Moore,
McRT-Malloc: A Scalable Non-Blocking Transaction Aware Memory Allocator Ali Adl-Tabatabai Ben Hertzberg Rick Hudson Bratin Saha.
Thread-Level Transactional Memory Decoupling Interface and Implementation UW Computer Architecture Affiliates Conference Kevin Moore October 21, 2004.
Nested Parallelism in Transactional Memory Kunal Agrawal, Jeremy T. Fineman and Jim Sukha MIT.
Transactional Memory (TM) Evan Jolley EE 6633 December 7, 2012.
Nested Transactional Memory: Model and Preliminary Architecture Sketches J. Eliot B. Moss Antony L. Hosking.
Continuously Recording Program Execution for Deterministic Replay Debugging.
1 Lecture 21: Transactional Memory Topics: consistency model recap, introduction to transactional memory.
1 MetaTM/TxLinux: Transactional Memory For An Operating System Hany E. Ramadan, Christopher J. Rossbach, Donald E. Porter and Owen S. Hofmann Presenter:
1 Lecture 7: Transactional Memory Intro Topics: introduction to transactional memory, “lazy” implementation.
1 Lecture 8: Transactional Memory – TCC Topics: “lazy” implementation (TCC)
1 Lecture 24: Transactional Memory Topics: transactional memory implementations.
Run time vs. Compile time
1 Lecture 6: TM – Eager Implementations Topics: Eager conflict detection (LogTM), TM pathologies.
Unbounded Transactional Memory Paper by Ananian et al. of MIT CSAIL Presented by Daniel.
1 Lecture 9: TM Implementations Topics: wrap-up of “lazy” implementation (TCC), eager implementation (LogTM)
Operating Systems (CSCI2413) Lecture 3 Processes phones off (please)
LogTM: Log-Based Transactional Memory Kevin E. Moore, Jayaram Bobba, Michelle J. Moravan, Mark D. Hill, & David A. Wood Presented by Colleen Lewis.
Transactions and Reliability. File system components Disk management Naming Reliability  What are the reliability issues in file systems? Security.
Introduction to Embedded Systems
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Chapter 18.
Data Concurrency Control And Data Recovery
AXML Transactions Debmalya Biswas. 16th AprSEIW Transactions A transaction can be considered as a group of operations encapsulated by the operations.
Sutirtha Sanyal (Barcelona Supercomputing Center, Barcelona) Accelerating Hardware Transactional Memory (HTM) with Dynamic Filtering of Privatized Data.
A Qualitative Survey of Modern Software Transactional Memory Systems Virendra J. Marathe Michael L. Scott.
CS5204 – Operating Systems Transactional Memory Part 2: Software-Based Approaches.
The Stack This is a special data structure: –The first item to be placed into the stack will be the last item taken out. Two basic operations: –Push: Places.
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
Kevin E. Moore, Jayaram Bobba, Michelle J. Moravan, Mark D. Hill & David A. Wood Presented by: Eduardo Cuervo.
StealthTest: Low Overhead Online Software Testing Using Transactional Memory Jayaram Bobba, Weiwei Xiong*, Luke Yen †, Mark D. Hill, and David A. Wood.
Processes and Virtual Memory
Software Transactional Memory Should Not Be Obstruction-Free Robert Ennals Presented by Abdulai Sei.
IM NTU Distributed Information Systems 2004 Distributed Transactions -- 1 Distributed Transactions Yih-Kuen Tsay Dept. of Information Management National.
© 2008 Multifacet ProjectUniversity of Wisconsin-Madison Pathological Interaction of Locks with Transactional Memory Haris Volos, Neelam Goyal, Michael.
Recovery technique. Recovery concept Recovery from transactions failure mean data restored to the most recent consistent state just before the time of.
© 2006 Mulitfacet ProjectUniversity of Wisconsin-Madison LogTM: Log-Based Transactional Memory Kevin E. Moore, Jayaram Bobba, Michelle J. Moravan, Mark.
4 November 2005 CS 838 Presentation 1 Nested Transactional Memory: Model and Preliminary Sketches J. Eliot B. Moss and Antony L. Hosking Presented by:

Database Recovery Techniques
Speculative Lock Elision
Minh, Trautmann, Chung, McDonald, Bronson, Casper, Kozyrakis, Olukotun
Part 2: Software-Based Approaches
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
Hardware Transactional Memory
Log-Based 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.
The University of Adelaide, School of Computer Science
Lecture 11: Transactional Memory
Log-based Transactional Memory
Lecture 6: Transactions
Lecture 21: Transactional Memory
Hybrid Transactional Memory
LogTM-SE: Decoupling Hardware Transactional Memory from Caches
The University of Adelaide, School of Computer Science
Performance Pathologies in Hardware Transactional Memory
Lecture 17 Multiprocessors and Thread-Level Parallelism
Performance Pathologies in Hardware Transactional Memory
Lecture 17 Multiprocessors and Thread-Level Parallelism
Lecture 23: Transactional Memory
Lecture 21: Transactional Memory
Lecture: Transactional Memory
The University of Adelaide, School of Computer Science
Lecture 17 Multiprocessors and Thread-Level Parallelism
Presentation transcript:

Supporting Nested Transactional Memory in LogTM Authors Michelle J Moravan Mark Hill Jayaram Bobba Ben Liblit Kevin Moore Michael Swift Luke Yen David Wood Presented By Shweta Padubidri

OVERVIEW Common Terms LogTM LogTM with nested Transactions Experiment Conclusion

Introduction Transactional Memory – Concurrency control mechanism to control access to shared memory in concurrent computing – Allows a group of load and store instructions in an atomic way Nested Transactional Memory – a new transaction started by an instruction already inside an existing transaction – Transaction Isolation: Changes made by nested transactions are not seen by the 'host' until it is committed.

Transactional Memory System Transactional Memory Systems Differences – (Data) Version Management Eager: record old values “elsewhere”; update “in place” Lazy: update “elsewhere”; keep old values “in place” – (Data) Conflict Detection Eager: detect conflict on every read/write Lazy: detect conflict at end (commit/abort)

Log Based TM Version Management – New values stored in place (in main memory) – Old values stored in a thread-private transaction log C Data BlockVA 00 R W c LogPtr TMcount LogBase 1000

Log Based TM

Version Management – When a commit occurs the LogTM processor clears its cache’s W bits and resets the thread’s log pointer – Drawback : aborts are slow – Abort: LogTM must undo the transaction by writing old values back – Reset the R/W bits – Undo proceeds from end of the log to the beginning (LIFO)

Example

Log Based TM Conflict Detection – Requesting processor sends a coherence request to the directory – Directory responds and forwards the request to one or more processors – Each responding processor examines local state to detect conflict – Responding processors either ack(no conflict) or nack(conflict) the request – Requesting processor resolves any conflict

Log Based TM

Nested LogTM Motivation – Facilitating Software Composition Closed Nesting – transactions remain isolated until parent commits – Partial Aborts improve performance – Enhancing Concurrency Open Nesting – transactions commit independent of parent – Manages isolation at a higher level of abstraction

Nested LogTM Motivation (Contd) – Escaping to Non-Transactional Systems Supports calls to lower level non-transactional system ( eg: OS), from within a transaction with escape actions.

Version Management in Nested LogTM Closed Nesting – Flat Nested transactions “flattened” into a single transaction Only outermost begins/commits are meaningful Any conflict aborts to outermost transaction – Partial Rollback Child transaction can be aborted independently Can avoid costly re-execution of parent transaction But child merges transaction state with parent on commit Most conflicts with child end up affecting the parent

Version Management in Nested LogTM Flat LogTM’s log is a single frame (Fixed Size header + undo records) Nested LogTM’s log is a stack of frames A frame contains: – Header (including saved registers and pointer to parent’s frame) – Undo records (block address, old value pairs) – Garbage headers (headers of committed closed transactions) – Commit action records – Compensating action records

Version Management in Nested LogTM The Log Structure LogPtr TM countHeader Undo record LogBase LogFrame Header 21

Closed Nested Commit Merge child’s log frame with parent’s – Mark child’s header as a “garbage header” – Copy pointer from child’s header to LogFrame LogFrame LogPtr TM count Undo record Header Undo record 1 2 Header

Nested LogTM Flat LogTM detects conflicts with directory coherence and Read (R ) and Write (W ) bits in caches Nested LogTM replicates R/W bits for each level Flash-Or circuit merges child and parent R/W bits

Example

Concurrency Higher-level atomicity – Child’s memory updates not undone if parent aborts – Use compensating action to undo the child’s forward action at a higher-level of abstraction Higher-level isolation – Release memory-level isolation – Programmer enforce isolation at higher level (e.g., locks) – Use commit action to release isolation at parent commit

Open Nesting Commit Actions – Execute in FIFO order when innermost open ancestor commits Compensating Actions – Discard when innermost open ancestor commits – Execute in LIFO order when ancestor aborts

Open Nesting Condition Condition O1: An open nested child transaction never modifies a memory location that has been modified by any ancestor. // initialize to 0 counter = 0; transaction_begin(); // top-level 1 counter++; // counter gets 1 open_begin(); // level 2 counter++; // counter gets 2 open_commit(abort_action(counter--));... // Abort and run compensating action // Expect counter to be restored to 0... transaction_commit(); // not executed

Open Nesting in LogTM Version Management – Open commit pops the most recent frame off the log – (Optionally) add commit and compensating action records – Compensating actions are run by the software abort handler Conflict Detection – R/W bits cleared on open commit – No ‘OR’ of the R/W bits occur

Example

Escape Actions Escape actions are used to implement low-level functions (eg: exception handlers, debuggers and other run-time support) but are hidden from high level programmers Low level escapes to software that is non- transactional (no atomicity or isolation) May not invoke a transaction May register commit and compensating actions Have no effect on the enclosing transactions It increases the variety of code that execute within transactions

Escape Action Rules Escape Actions need to Obey – Condition X1: No writes to Data Written by Ancestors – Conditions X2: No Writes to Data Accessed by Others – Condition X3: No Reads to Data Written by Others

Escape Action in LogTM Version Management – No changes are made to the log. Read and Write access coherent memory to return the value from the latest uncommitted write Conflict Detection – No changes are made to the Read and Write bits Implements escape actions with a per thread flag, which disables logging and conflict detection when set. If an ancestor transaction aborts while the escape action is running, abort is delayed until the flag is cleared.

Experiment BTree Micro benchmark – Each Thread makes a repeated access to a shared tree – Lookup Probability(85%) and Insert(15%) – Each insert or lookup is executed as a top level transaction – New nodes are allocated from a shared free list using pen and closed nested transaction

B-Tree: Closed Nesting

B-Tree: Open Nesting

Conclusion Closed Nesting (partial rollback) – Easy to implement--segment the transaction log (stack of log frames)/Replicate R & W bits – Small performance gains for LogTM Open Nesting – Easy to implement--software abort handling allows easy execution of commit actions and compensating actions – Big performance gains Escape Actions – Provide non-transactional operations inside transactions

Questions ???