JVSTM and its applications João Software Engineering Group.

Slides:



Advertisements
Similar presentations
Time-based Transactional Memory with Scalable Time Bases Torvald Riegel, Christof Fetzer, Pascal Felber Presented By: Michael Gendelman.
Advertisements

Read-Write Lock Allocation in Software Transactional Memory Amir Ghanbari Bavarsad and Ehsan Atoofian Lakehead University.
Enabling Speculative Parallelization via Merge Semantics in STMs Kaushik Ravichandran Santosh Pande College.
IDIT KEIDAR DMITRI PERELMAN RUI FAN EuroTM 2011 Maintaining Multiple Versions in Software Transactional Memory 1.
Wait-Free Reference Counting and Memory Management Håkan Sundell, Ph.D.
U NIVERSITY OF M ASSACHUSETTS, A MHERST – Department of Computer Science The Implementation of the Cilk-5 Multithreaded Language (Frigo, Leiserson, and.
Week 7 - Friday.  What did we talk about last time?  Allocating 2D arrays.
Safety Definitions and Inherent Bounds of Transactional Memory Eshcar Hillel.
Pessimistic Software Lock-Elision Nir Shavit (Joint work with Yehuda Afek Alexander Matveev)
Lecture 11 Recoverability. 2 Serializability identifies schedules that maintain database consistency, assuming no transaction fails. Could also examine.
Presented by, MySQL & O’Reilly Media, Inc. Falcon from the Beginning Jim Starkey
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)
Ali Saoud Object Based Transactional Memory. Introduction Resent trends go towards object based SMT because it’s dynamic Word-based STM systems are more.
Asynchronous Assertions Eddie Aftandilian and Sam Guyer Tufts University Martin Vechev ETH Zurich and IBM Research Eran Yahav Technion.
Guy Korland Tel Aviv University CRAFTING A READY-TO-GO STM.
Future Work Needed Kenneth Wade Najim Yaqubie. Outline 1.Model is simple 2.Too many assumptions 3.Conflicting internal architectures 4.Security Challenges.
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.
DMITRI PERELMAN IDIT KEIDAR TRANSACT 2010 SMV: Selective Multi-Versioning STM 1.
Lock vs. Lock-Free memory Fahad Alduraibi, Aws Ahmad, and Eman Elrifaei.
University of Michigan Electrical Engineering and Computer Science 1 Parallelizing Sequential Applications on Commodity Hardware Using a Low-Cost Software.
Quick Review of May 1 material Concurrent Execution and Serializability –inconsistent concurrent schedules –transaction conflicts serializable == conflict.
1 Virtual Memory vs. Physical Memory So far, all of a job’s virtual address space must be in physical memory However, many parts of programs are never.
CS510 Advanced OS Seminar Class 10 A Methodology for Implementing Highly Concurrent Data Objects by Maurice Herlihy.
CS510 Concurrent Systems Class 13 Software Transactional Memory Should Not be Obstruction-Free.
1 New Architectures Need New Languages A triumph of optimism over experience! Ian Watson 3 rd July 2009.
ObjectStore Martin Wasiak. ObjectStore Overview Object-oriented database system Can use normal C++ code to access tuples Easily add persistence to existing.
A Transaction-Friendly Dynamic Memory Manager for Embedded Multicore Systems Maurice Herlihy Joint with Thomas Carle, Dimitra Papagiannopoulou Iris Bahar,
An Introduction to Software Transactional Memory
1 Scalable and transparent parallelization of multiplayer games Bogdan Simion MASc thesis Department of Electrical and Computer Engineering.
Software Transactional Memory for Dynamic-Sized Data Structures Maurice Herlihy, Victor Luchangco, Mark Moir, William Scherer Presented by: Gokul Soundararajan.
Roberto Palmieri – Workshop on Distributed Transactional Memory (WDTM 2012) - 22/02/2012 Lisbon Boosting STM Replication via Speculation Roberto Palmieri,
HPDCS Research Group Research Focus STM Systems Dependability of STM Performance Modelling of STM EURO-TM | 1 st Plenary.
Reduced Hardware NOrec: A Safe and Scalable Hybrid Transactional Memory Alexander Matveev Nir Shavit MIT.
A Qualitative Survey of Modern Software Transactional Memory Systems Virendra J. Marathe Michael L. Scott.
Lecture 12 Recoverability and failure. 2 Optimistic Techniques Based on assumption that conflict is rare and more efficient to let transactions proceed.
Integrating and Optimizing Transactional Memory in a Data Mining Middleware Vignesh Ravi and Gagan Agrawal Department of ComputerScience and Engg. The.
Concurrency Server accesses data on behalf of client – series of operations is a transaction – transactions are atomic Several clients may invoke transactions.
A Consistency Framework for Iteration Operations in Concurrent Data Structures Yiannis Nikolakopoulos A. Gidenstam M. Papatriantafilou P. Tsigas Distributed.
Chapter 16 Recovery Yonsei University 1 st Semester, 2015 Sanghyun Park.
State Teleportation How Hardware Transactional Memory can Improve Legacy Data Structures Maurice Herlihy and Eli Wald Brown University.
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.
Maged M.Michael Michael L.Scott Department of Computer Science Univeristy of Rochester Presented by: Jun Miao.
CS162 Week 5 Kyle Dewey. Overview Announcements Reactive Imperative Programming Parallelism Software transactional memory.
Computer Science Lecture 13, page 1 CS677: Distributed OS Last Class: Canonical Problems Election algorithms –Bully algorithm –Ring algorithm Distributed.
A Methodology for Creating Fast Wait-Free Data Structures Alex Koganand Erez Petrank Computer Science Technion, Israel.
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.
A Multiversion Update-Serializable Protocol for Genuine Partial Data Replication Sebastiano Peluso, Pedro Ruivo, Paolo Romano, Francesco Quaglia and Luís.
Software Transactional Memory Should Not Be Obstruction-Free Robert Ennals Presented by Abdulai Sei.
A Lightweight Transactional Design in Flash-based SSDs to Support Flexible Transactions Youyou Lu 1, Jiwu Shu 1, Jia Guo 1, Shuai Li 1, Onur Mutlu 2 LightTx:
Lecture 27 Multiprocessor Scheduling. Last lecture: VMM Two old problems: CPU virtualization and memory virtualization I/O virtualization Today Issues.
MULTIVIE W Slide 1 (of 21) Software Transactional Memory Should Not Be Obstruction Free Paper: Robert Ennals Presenter: Emerson Murphy-Hill.
4 November 2005 CS 838 Presentation 1 Nested Transactional Memory: Model and Preliminary Sketches J. Eliot B. Moss and Antony L. Hosking Presented by:
Computer Science Lecture 13, page 1 CS677: Distributed OS Last Class: Canonical Problems Election algorithms –Bully algorithm –Ring algorithm Distributed.
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.
Minh, Trautmann, Chung, McDonald, Bronson, Casper, Kozyrakis, Olukotun
Parallel Programming By J. H. Wang May 2, 2017.
Isotope: Transactional Isolation for Block Storage
Faster Data Structures in Transactional Memory using Three Paths
Introduction to Operating Systems
Lecture 6: Transactions
Introduction of Week 13 Return assignment 11-1 and 3-1-5
Deferred Runtime Pipelining for contentious multicore transactions
Concurrent Cache-Oblivious B-trees Using Transactional Memory
Dynamic Performance Tuning of Word-Based Software Transactional Memory
Concurrency control (OCC and MVCC)
Presentation transcript:

JVSTM and its applications João Software Engineering Group

J ava V ersioned S oftware T ransactional M emory

First developed in 2005 (web page not update since 2006)

Outline Original design of the JVSTM Recent changes to the JVSTM What we have been doing with it

First multi-version STM Designed for very large transactions and high read/write ratio

The goal: ease of programming (without incurring into too much overhead)

It is not a transparent STM

Versioned Boxes B body: previous: value: 2 version: 13 previous: value: 1 version: 8 previous: null value: 0 version: 4 VBox + T get() + put(T value)

Versioned Boxes B body: previous: value: 2 version: 13 previous: value: 1 version: 8 previous: null value: 0 version: 4 GCed when no longer needed

Versioned Boxes B body: previous: null value: 2 version: 13 Reading a box: - follow body - compare version - return value - wait-free - no sync actions - no allocation

No inconsistent reads (JVSTM ensures opacity)

Read-only txs Begin Tx (lock-free) Read boxes (wait-free) Commit / abort Tx (lock-free) Entire TX lock-free Becaus e of GC

Read-only transactions never conflict (MV-permissiveness)

Read-write txs Begin Tx (lock-free) Read / write boxes (wait-free) Abort Tx (lock-free) Commit Tx (global lock)

Lock-based commit commit() { GLOBAL_LOCK.lock(); try { } finally { GLOBAL_LOCK.unlock(); }

Lock-based commit commit() { GLOBAL_LOCK.lock(); try { if (validate()) { } } finally { GLOBAL_LOCK.unlock(); }

Lock-based commit commit() { GLOBAL_LOCK.lock(); try { if (validate()) { int newTxNumber = globalCounter + 1; writeBack(newTxNumber); globalCounter = newTxNumber; } } finally { GLOBAL_LOCK.unlock(); }

Very simple design...

Works really well in practice

Lock-based commit commit() { GLOBAL_LOCK.lock(); try { } finally { GLOBAL_LOCK.unlock(); } If uncontended, this is quite fast!

Good when few read-write txs or txs long enough so that commits do not overlap often

(machine with 196 physical cores)

Lock-based commit commit() { GLOBAL_LOCK.lock(); try { if (validate()) { } } finally { GLOBAL_LOCK.unlock(); } We may do other things here...

Delay computations until commit time, if they cause many conflicts

STMBench7

What about small transactions?

Read-write txs Begin Tx (lock-free) Read / write boxes (wait-free) Abort Tx (lock-free) Commit Tx (global lock) Can we make it better?

Read-write txs Begin Tx (lock-free) Read / write boxes (wait-free) Abort Tx (wait-free) Commit Tx (lock-free)

JVSTM completely lock-free

Lock-free isn’t that hard...

Efficient and lock-free is!

JVSTM still not optimized for tiny transactions

We’re working on it Eliminate memory allocation Stealth transactions Make beginTx wait-free Optimize fast path of read/write Versioned arrays...

JVSTM applications?

More recently STM-based Thread Level Speculation Dynamic Software Updates Automatic memoization of functions with side-effects

This led to Transactional collections (queues, maps, sets, etc) I/O streams Inevitable transactions Exploring failure atomicity...

But it all started with the FénixEDU system (> 1 million LOCs)

First real-world application of STMs

The Fénix Framework

Simplify the development of applications with a transactional and persistent rich domain model (AKA enterprise applications)

Simpler programming model Better performance* Explores multicores

Original JDBC-based (1000 items)

FF-based (1000 items)

Original JDBC-based (10000 items)

FF-based (10000 items)

Some Fénix statistics

Normal week

February 2010

17th to 19th No way we could get this before

ReadsWritesConflicts Normal day th February