PHyTM: Persistent Hybrid Transactional Memory

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

Transactional Memory Parag Dixit Bruno Vavala Computer Architecture Course, 2012.
Read-Write Lock Allocation in Software Transactional Memory Amir Ghanbari Bavarsad and Ehsan Atoofian Lakehead University.
Crash Recovery John Ortiz. Lecture 22Crash Recovery2 Review: The ACID properties  Atomicity: All actions in the transaction happen, or none happens 
Principles of Transaction Management. Outline Transaction concepts & protocols Performance impact of concurrency control Performance tuning.
CS492B Analysis of Concurrent Programs Lock Basics Jaehyuk Huh Computer Science, KAIST.
Transactional Locking Nir Shavit Tel Aviv University (Joint work with Dave Dice and Ori Shalev)
Transactional Memory Supporting Large Transactions Anvesh Komuravelli Abe Othman Kanat Tangwongsan Hardware-based.
Pessimistic Software Lock-Elision Nir Shavit (Joint work with Yehuda Afek Alexander Matveev)
Hybrid Transactional Memory Nir Shavit MIT and Tel-Aviv University Joint work with Alex Matveev (and describing the work of many in this summer school)
Thread-Level Transactional Memory Decoupling Interface and Implementation UW Computer Architecture Affiliates Conference Kevin Moore October 21, 2004.
Transactional Memory (TM) Evan Jolley EE 6633 December 7, 2012.
PARALLEL PROGRAMMING with TRANSACTIONAL MEMORY Pratibha Kona.
1 MetaTM/TxLinux: Transactional Memory For An Operating System Hany E. Ramadan, Christopher J. Rossbach, Donald E. Porter and Owen S. Hofmann Presenter:
[ 1 ] Agenda Overview of transactional memory (now) Two talks on challenges of transactional memory Rebuttals/panel discussion.
Lock vs. Lock-Free memory Fahad Alduraibi, Aws Ahmad, and Eman Elrifaei.
Unbounded Transactional Memory Paper by Ananian et al. of MIT CSAIL Presented by Daniel.
Why The Grass May Not Be Greener On The Other Side: A Comparison of Locking vs. Transactional Memory Written by: Paul E. McKenney Jonathan Walpole Maged.
A Transaction-Friendly Dynamic Memory Manager for Embedded Multicore Systems Maurice Herlihy Joint with Thomas Carle, Dimitra Papagiannopoulou Iris Bahar,
Highly Available ACID Memory Vijayshankar Raman. Introduction §Why ACID memory? l non-database apps: want updates to critical data to be atomic and persistent.
An Integrated Hardware-Software Approach to Transactional Memory Sean Lie Theory of Parallel Systems Monday December 8 th, 2003.
An Introduction to Software Transactional Memory
Software Transactional Memory for Dynamic-Sized Data Structures Maurice Herlihy, Victor Luchangco, Mark Moir, William Scherer Presented by: Gokul Soundararajan.
Solution to Dining Philosophers. Each philosopher I invokes the operations pickup() and putdown() in the following sequence: dp.pickup(i) EAT dp.putdown(i)
Accelerating Precise Race Detection Using Commercially-Available Hardware Transactional Memory Support Serdar Tasiran Koc University, Istanbul, Turkey.
Reduced Hardware NOrec: A Safe and Scalable Hybrid Transactional Memory Alexander Matveev Nir Shavit MIT.
WG5: Applications & Performance Evaluation Pascal Felber
Low-Overhead Software Transactional Memory with Progress Guarantees and Strong Semantics Minjia Zhang, 1 Jipeng Huang, Man Cao, Michael D. Bond.
Hybrid Transactional Memory Sanjeev Kumar, Michael Chu, Christopher Hughes, Partha Kundu, Anthony Nguyen, Intel Labs University of Michigan Intel Labs.
On the Performance of Window-Based Contention Managers for Transactional Memory Gokarna Sharma and Costas Busch Louisiana State University.
CS510 Concurrent Systems Why the Grass May Not Be Greener on the Other Side: A Comparison of Locking and Transactional Memory.
Technology from seed Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham, Paulo Ferreira and João.
Consistency Oblivious Programming Hillel Avni Tel Aviv University.
Transaction Management Transparencies. ©Pearson Education 2009 Chapter 14 - Objectives Function and importance of transactions. Properties of transactions.
CoreDet: A Compiler and Runtime System for Deterministic Multithreaded Execution Tom Bergan Owen Anderson, Joe Devietti, Luis Ceze, Dan Grossman To appear.
Hardware and Software transactional memory and usages in MRE
Review of Computer System Organization. Computer Startup For a computer to start running when it is first powered up, it needs to execute an initial program.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 6: Process Synchronization.
On Transactional Memory, Spinlocks and Database Transactions Khai Q. Tran Spyros Blanas Jeffrey F. Naughton (University of Wisconsin Madison)
CSCI1600: Embedded and Real Time Software Lecture 17: Concurrent Programming Steven Reiss, Fall 2015.
ECE 1747: Parallel Programming Short Introduction to Transactions and Transactional Memory (a.k.a. Speculative Synchronization)
Novel Paradigms of Parallel Programming Prof. Smruti R. Sarangi IIT Delhi.
Free Transactions with Rio Vista Landon Cox April 15, 2016.
Irina Calciu Justin Gottschlich Tatiana Shpeisman Gilles Pokam
Free Transactions with Rio Vista
Algorithmic Improvements for Fast Concurrent Cuckoo Hashing
Transaction Management
Tong Zhang, Dongyoon Lee, Changhee Jung
Minh, Trautmann, Chung, McDonald, Bronson, Casper, Kozyrakis, Olukotun
Transactional Memory : Hardware Proposals Overview
Alex Kogan, Yossi Lev and Victor Luchangco
Faster Data Structures in Transactional Memory using Three Paths
Advanced Operating Systems - Fall 2009 Lecture 8 – Wednesday February 4, 2009 Dan C. Marinescu Office: HEC 439 B. Office hours: M,
Transactions.
Superscalar Processors & VLIW Processors
Lecture 6: Transactions
Free Transactions with Rio Vista
Yiannis Nikolakopoulos
Thread Synchronization
Hassium: Hardware Assisted Database Synchronization
Multicore programming
Hybrid Transactional Memory
Chapter 6: Process Synchronization
Design and Implementation Issues for Atomicity
Software Transactional Memory Should Not be Obstruction-Free
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
CONCURRENCY Concurrency is the tendency for different tasks to happen at the same time in a system ( mostly interacting with each other ) .   Parallel.
CSE 542: Operating Systems
CSE 542: Operating Systems
Presentation transcript:

PHyTM: Persistent Hybrid Transactional Memory 2017-08-01 PHyTM: Persistent Hybrid Transactional Memory Hillel Avni Huawei Trevor Brown University of Toronto

Contents HTM Persistent HTM (PHTM) Hybrid TM (HyTM) Persistent HyTM (PHyTM)

Hardware Transactional Memory Exploit native cache coherence invalidation consistency checking rollback

HTM in Intel x86 architecture

Contents HTM Persistent HTM (PHTM) Hybrid TM (HyTM) Persistent HyTM (PHyTM)

Persistent HTM (PHTM) in NVM Nonvolatile memory (NVM) future: Fast as DRAM Size of a disk Goal: ACID HTM transactions in NVM

Persistent HTM (PHTM) in NVM Problem: NVM will replace DDR but not L1 cache HTM must work in L1 cache to be efficient Solution: Persistent HTM commit (DISC’15)

Commit and Log Simultaneously Writing X in PHTM No Live Transaction T wrote X X is committed and logged HTM commits in volatile cache but log bit is set in NVM. Implies the new ISA - xend_log

Contents HTM Persistent HTM (PHTM) Hybrid TM (HyTM) Persistent HyTM (PHyTM)

To ensure progress, we need a software fallback HTM has a Problem Good: Hardware Transactional Memory (HTM) Bad: The HTM is “best-effort” HTM may always fail due to (partial list): L1 cache capacity Interrupt Unsupported instruction To ensure progress, we need a software fallback

First Solution: Global Lock Fallback Thread 1 Thread 2 1. HTM Start 1. HTM Start 2. Read lock and check it is free 2. Read lock and check it is free 3. ... code … 3. ... code … 4. HTM Commit 4. HTM Commit No conflict – HTMs commit concurrently

First Solution: Global Lock Fallback Thread 1 Thread 2 Thread 3 Wait for Lock 1. HTM Start 1. HTM Start Wait for Lock 1. Acquire Lock 1. HTM Start 2. Read lock and check it is free 2. Read lock and check it is free 2. Read lock and check it is free 2. ... code … 4. ... CONFLICT … HTM Restart 3. ... code … 4. ... CONFLICT … HTM Restart 3. ... code … 3. ... FAIL … HTM Restart 3. ... code … 3. Release Lock No concurrency between hardware and software

First Solution: Global Lock Fallback Good Simple: No need to instrument reads and writes Bad: Serial fallback: A software fallback grabs the global lock and aborts all hardware transactions

Another Approach is: Hybrid TM Thread 1 Thread 2 Thread 3 1. HTM Start 1. HTM Start 1. STM Start 1. HTM Start 2. Read lock and check it is free 2. Read lock and check it is free 2. Read lock and check it is free 2. ... code … 3. ... code … 3. ... code … 3. ... code … 3. ... FAIL … HTM Restart 3. … more code … 4. ... more code 4. ... more code … STM and HTM execute concurrently

Another Approach is: Hybrid TM Good Hardware-Software Concurrency Bad: Complex: Hard to coordinate hardware and software Hard to apply to code due to instrumentation Our focus GCC C/C++ TM can help here

Contents HTM Persistent HTM (PHTM) Hybrid TM (HyTM) Persistent HyTM (PHyTM)

Persistent Software TM (PSTM) Read: Lock and read Write: Lock and buffer the write in NVM Commit time: Write back and flush (WB) the write-set Release the locks

PHyTM Execution paths Code can execute in three modes: Fast PHTM: Only writes check the locks Slow PHTM: Check locks for reads and writes PSTM Paths that can run concurrently: Fast PHTM & PSTM (except WB) Slow PHTM & PSTM (including WB)

Slow-Path Software: PSTM PHyTM Fast-PHTM Slow-PHTM Slow-Path Software: PSTM Check WB existence Lock X Read y (pure) Write X (Buffered) Increment WB Count ABORT write back / Flush Check y Lock Unlock x Read y Check x Lock Write x xend_log decrement WB Count

Experiments Algorithms Workloads PHyTM PHTM 2PL from Yu et al. VLDB’14, with persistance Workloads YCSB Long transactions that abort HTM Short transactions that fit in L1

Long Transactions (256 reads) PHyTM and 2PL are fast PHTM is slow

Short Transactions (16 reads) PHyTM and PHTM are fast 2PL is slow

One Core Runs Long Transactions PHyTM is fast 2PL and PHTM are slow

Conclusion PHyTM provides transactions with a high degree of concurrency and low overhead When small transactions are common, PHyTM can improve the performance of synchronization and persistence