DMITRI PERELMAN IDIT KEIDAR TRANSACT 2010 SMV: Selective Multi-Versioning STM 1.

Slides:



Advertisements
Similar presentations
Transactional Memory Parag Dixit Bruno Vavala Computer Architecture Course, 2012.
Advertisements

Privatization Techniques for Software Transactional Memory Michael F. Spear, Virendra J. Marathe, Luke Dalessandro, and Michael L. Scott University of.
School of Information Technologies Hyungsoo Jung (presenter) Hyuck Han* Alan Fekete Uwe Röhm Serializable Snapshot Isolation for Replicated Databases in.
Relaxed Consistency Models. Outline Lazy Release Consistency TreadMarks DSM system.
Exploiting Distributed Version Concurrency in a Transactional Memory Cluster Kaloian Manassiev, Madalin Mihailescu and Cristiana Amza University of Toronto,
Serializable Isolation for Snapshot Databases Michael J. Cahill, Uwe Röhm, and Alan D. Fekete University of Sydney ACM Transactions on Database Systems.
Presented by: Dmitri Perelman.  Intro  “Don’t touch my read-set” approach  “Precedence graphs” approach  On avoiding spare aborts  Your questions.
IDIT KEIDAR DMITRI PERELMAN RUI FAN EuroTM 2011 Maintaining Multiple Versions in Software Transactional Memory 1.
5.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 5: CPU Scheduling.
Virendra J. Marathe, William N. Scherer III, and Michael L. Scott Department of Computer Science University of Rochester Presented by: Armand R. Burks.
Software Transactional Memory Kevin Boos. Two Papers Software Transactional Memory for Dynamic-Sized Data Structures (DSTM) – Maurice Herlihy et al –
Safety Definitions and Inherent Bounds of Transactional Memory Eshcar Hillel.
Inherent limitations on DAP TMs 1 Inherent Limitations on Disjoint-Access Parallel Transactional Memory Hagit Attiya, Eshcar Hillel, Alessia Milani Technion.
Pessimistic Software Lock-Elision Nir Shavit (Joint work with Yehuda Afek Alexander Matveev)
Quantifying Isolation Anomalies Alan Fekete Shirley Goldrei Jorge Perez Asenjo At VLDB’09, Lyon, August 2009.
Transactional Memory (TM) Evan Jolley EE 6633 December 7, 2012.
Multiversion Access Methods - Temporal Indexing. Basics A data structure is called : Ephemeral: updates create a new version and the old version cannot.
PARALLEL PROGRAMMING with TRANSACTIONAL MEMORY Pratibha Kona.
Threading Part 2 CS221 – 4/22/09. Where We Left Off Simple Threads Program: – Start a worker thread from the Main thread – Worker thread prints messages.
Presented by: Ofer Kiselov & Omer Kiselov Supervised by: Dmitri Perelman Final Presentation.
DMITRI PERELMAN ANTON BYSHEVSKY OLEG LITMANOVICH IDIT KEIDAR DISC 2011 SMV: Selective Multi-Versioning STM 1.
TOWARDS A SOFTWARE TRANSACTIONAL MEMORY FOR GRAPHICS PROCESSORS Daniel Cederman, Philippas Tsigas and Muhammad Tayyab Chaudhry.
Submitted by: Omer & Ofer Kiselov Supevised by: Dmitri Perelman Networked Software Systems Lab Department of Electrical Engineering, Technion.
Idit Keidar and Dmitri Perelman Technion 1 SPAA 2009.
University of Michigan Electrical Engineering and Computer Science 1 Parallelizing Sequential Applications on Commodity Hardware Using a Low-Cost Software.
1 Lecture 8: Transactional Memory – TCC Topics: “lazy” implementation (TCC)
TM Input Acceptance Vincent Gramoli, Derin Harmanci, Pascal Felber EPFL LPD - University of Neuchâtel Switzerland.
Transaction Processing: Concurrency and Serializability 10/4/05.
The Cost of Privatization Hagit Attiya Eshcar Hillel Technion & EPFLTechnion.
1 Sharing Objects – Ch. 3 Visibility What is the source of the issue? Volatile Dekker’s algorithm Publication and Escape Thread Confinement Immutability.
Alternative Concurrency Control Methods R&G - Chapter 17.
Transactions and Reliability. File system components Disk management Naming Reliability  What are the reliability issues in file systems? Security.
An Introduction to Software Transactional Memory
P ARALLEL P ROCESSING I NSTITUTE · F UDAN U NIVERSITY 1.
Automatic Data Partitioning in Software Transactional Memories Torvald Riegel, Christof Fetzer, Pascal Felber (TU Dresden, Germany / Uni Neuchatel, Switzerland)
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
Reduced Hardware NOrec: A Safe and Scalable Hybrid Transactional Memory Alexander Matveev Nir Shavit MIT.
School of Information Technologies Michael Cahill 1, Uwe Röhm and Alan Fekete School of IT, University of Sydney {mjc, roehm, Serializable.
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.
WG5: Applications & Performance Evaluation Pascal Felber
Lowering the Overhead of Software Transactional Memory Virendra J. Marathe, Michael F. Spear, Christopher Heriot, Athul Acharya, David Eisenstat, William.
JVSTM and its applications João Software Engineering Group.
On the Performance of Window-Based Contention Managers for Transactional Memory Gokarna Sharma and Costas Busch Louisiana State University.
Shared Memory Consistency Models. SMP systems support shared memory abstraction: all processors see the whole memory and can perform memory operations.
DOUBLE INSTANCE LOCKING A concurrency pattern with Lock-Free read operations Pedro Ramalhete Andreia Correia November 2013.
1 Multiversion Reconciliation for Mobile Databases Shirish Hemanath Phatak & B.R.Badrinath Presented By Presented By Md. Abdur Rahman Md. Abdur Rahman.
WTM’12, Bern, April 10, 2012 In-Place Metainfo Support in DeuceSTM Ricardo J. Dias, Tiago M. Vale and João M. Lourenço CITI / Universidade Nova de Lisboa.
Wait-Free Multi-Word Compare- And-Swap using Greedy Helping and Grabbing Håkan Sundell PDPTA 2009.
Technology from seed Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham, Paulo Ferreira and João.
Giovanni Chierico | May 2012 | Дубна Data Concurrency, Consistency and Integrity.
Consistency Oblivious Programming Hillel Avni Tel Aviv University.
Specifying Multithreaded Java semantics for Program Verification Abhik Roychoudhury National University of Singapore (Joint work with Tulika Mitra)
Database Isolation Levels. Reading Database Isolation Levels, lecture notes by Dr. A. Fekete, resentation/AustralianComputer.
Reachability Testing of Concurrent Programs1 Reachability Testing of Concurrent Programs Richard Carver, GMU Yu Lei, UTA.
4 November 2005 CS 838 Presentation 1 Nested Transactional Memory: Model and Preliminary Sketches J. Eliot B. Moss and Antony L. Hosking Presented by:
NB-FEB: A Universal Scalable Easy- to-Use Synchronization Primitive for Manycore Architectures Phuong H. Ha (Univ. of Tromsø, Norway) Philippas Tsigas.
Concurrent Revisions: A deterministic concurrency model. Daan Leijen & Sebastian Burckhardt Microsoft Research (OOPSLA 2010, ESOP 2011)
Java Thread Programming
An Operational Approach to Relaxed Memory Models
Minh, Trautmann, Chung, McDonald, Bronson, Casper, Kozyrakis, Olukotun
Specifying Multithreaded Java semantics for Program Verification
Concurrency Control II (OCC, MVCC)
CS510 - Portland State University
Lecture 23: Transactional Memory
Concurrent Cache-Oblivious B-trees Using Transactional Memory
Problems with Locks Andrew Whitaker CSE451.
Dynamic Performance Tuning of Word-Based Software Transactional Memory
Concurrency control (OCC and MVCC)
Presentation transcript:

DMITRI PERELMAN IDIT KEIDAR TRANSACT 2010 SMV: Selective Multi-Versioning STM 1

Agenda TRANSACT Introduction and problem statement  reduce the number of aborts  memory consumption  invisible reads SMV algorithm  keeps versions that can help save aborts  automatically removes others Preliminary evaluation  good for read-dominated workloads

Forceful aborts TRANSACT 2010 Aborting transactions is bad  work is lost  resources are wasted  overall throughput decreases  livelock 3

Unnecessary aborts TRANSACT 2010 Sometimes aborts are necessary  continuing the run would violate correctness And sometimes they are not  the suspicion is unjustified 4 o1 o2 C A necessary abort o1 o2 C A unnecessary abort T2 T1 T2 T3

Multi-Versioning in STM TRANSACT 2010 Keeping multiple versions can prevent aborts 5 o1 o2 CC cannot read the latest version – read the previous one o1 o2 C cannot read the latest version – abort A T1T2T1T2 Single-versioned STMMulti-versioned STM

GC challenge TRANSACT Must clean up the old versions Many existing TMs keep a list of n past versions  some kept versions are useless  some potentially useful versions are removed o1 o2 The sixth version is removed The needed version has been removed A TM keeps the list of 5 past object versions Past versions are kept though they will never be read T1T2

Visibility challenge TRANSACT Changes in memory accessed by other transactions  demand the use of costly mechanisms (e.g., volatile variables) We want invisible readers  do not change data that can be read by others  avoid cache thrashing

Agenda TRANSACT Introduction and problem statement  reduce the number of aborts  memory consumption  invisible reads SMV algorithm  keeps versions that can help save aborts  automatically removes others Preliminary evaluation  good for read-dominated workloads

SMV design principles TRANSACT A txn is aborted if:  update txn: an object from the read-set is overwritten (like most other STMs existing today)  read-only txn: (almost) never – commits in a lock-free manner T i reads the latest object value written before T i starts Versions are kept as long as they might be needed Read-only transactions are invisible o1 o2 C C T1T2 o3 Start time snapshot

SMV design principles – GC challenge TRANSACT No transaction can know whether a given version can be removed  explicit GC is not possible A version is removed when it has no potential readers Readers are invisible o1 o2 C T1T2 o1 o2 C T2 Kept Removed Indistinguishable

Automated GC in SMV TRANSACT Solution: use auxiliary GC threads provided by managed memory systems  remove unreachable object versions Read-only transactions are invisible to other transactions, but visible to the “see-all” GC threads  theoretically visible  practically invisible (GC threads run infrequently)

SMV time progress TRANSACT Logical version clock  incremented by update transactions upon commit  implemented as a linked list of time points Object handles  hold versioned locks ala TL2  point to the latest object version only time point 9time point 10time point 11 ver = 5 o1o1 data curPoint

Selective Multi-Versioning STM – overview TRANSACT curPoint time point 9 T1 ver = 5 o1o1 data 5 o1 o2 ver = 5 o2o2 data 5 C time point 10 ver = 10 data 10 ver ≤ start time? T1T2 The value to be read

Selective Multi-Versioning STM – GC overview TRANSACT curPoint time point 9 o1o1 data 5 o1 o2 o2o2 data 5 C time point 10 ver = 10 data 10 C time point 11 T1T2 T1 Old versions are kept as long as they have potential readers  after that they are garbage collected automatically

“Unready” time points issue TRANSACT Committing transaction:  first inserts the new time point  then updates the write-set Potential problem: A similar problem is the reason for using locks + double checking in TL2 (each read is pre- and post-validated) curPoint time point 9 T2 ver = 5 o1o1 data 5 ver = 5 o2o2 data 5 time point 10 ver = 10 data 10 ver ≤ start time? reads o 1 and o 2 T1 writes o 1 and o 2 correctness violation! paused

“Unready” time points solution TRANSACT Each time point has a boolean ready flag  true when all the objects are updated readyPoint points to the latest time point in the ready prefix curPoint time point 9 ready = true T2 ver = 5 o1o1 data 5 ver = 5 o2o2 data 5 time point 10 ready = false ver = 10 data 10 ver ≤ start time? reads o 1 and o 2 T1 writes o 1 and o 2 consistent snapshot readyPoint paused

Limiting time point traversals TRANSACT The number of traversed time points might be large  a long read-only txn interleaves with a lot of short update txns Limit this number  the txn is aborted after traversing WindowSize time points Breaks the guarantee of unabortable read-only txns  but improves performance T1 …… WindowSize time point 9time point 10time point 11time point 59time point 60

Agenda TRANSACT Introduction and problem statement  reduce the number of aborts  memory consumption  invisible reads SMV algorithm  keeps versions that can help save aborts  automatically removes others Preliminary evaluation  good for read-dominated workloads

Preliminary evaluation – experiment setup TRANSACT STMBench7 evaluation framework – Java version  read-dominated and read-write workloads support Implemented the following algorithms:  SMV (WindowSize = 100)  SMVUnlimited (WindowSize = ∞)  TL2-style – mimics the basic behavior of TL2  k-versioned – each object keeps k versions (like in LSA) Did not use the software optimizations used in the original algorithms  common code platform for comparing the algorithmic issues only

Read-dominated workloads TRANSACT Emphasize the strong sides of SMV:  intensive use of old object versions by read-only txns  read-only txns do not need to traverse many time points

Read-write workloads TRANSACT Present the worst-case scenario for SMV:  update txns cannot leverage multiple versions (low commit-ratio)  read-only txns traverse long time point list suffixes (high overhead)

Memory consumption TRANSACT SMVUnlimited memory consumption is high because of long read-only txns Read-dominated workloadsRead-write workloads SMV memory consumption is low – for most of the objects keeps last version only

Further work TRANSACT Deuce framework  field-based synchronization  STAMP + STMBench7 benchmarks built-in Profiling  overhead vs. aborts rate GC threads in the non-managed environment  fine-tuned GC for txn objects

TRANSACT Thank you