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.

Slides:



Advertisements
Similar presentations
Software Transactional Objects Guy Eddon Maurice Herlihy TRAMP 2007.
Advertisements

A Randomized Dynamic Program Analysis for Detecting Real Deadlocks Pallavi Joshi  Chang-Seo Park  Koushik Sen  Mayur Naik ‡  Par Lab, EECS, UC Berkeley‡
Problem Solving 5 Using Java API for Searching and Sorting Applications ICS-201 Introduction to Computing II Semester 071.
A Randomized Dynamic Program Analysis for Detecting Real Deadlocks Koushik Sen CS 265.
CompSci Searching & Sorting. CompSci Searching & Sorting The Plan  Searching  Sorting  Java Context.
Inlining Java Native Calls at Runtime (CASCON 2005 – 4 th Workshop on Compiler Driven Performance) Levon Stepanian, Angela Demke Brown Computer Systems.
B. Childers, M. L. Soffa, J. Beaver, L. Ber, K. Cammarata, J. Litman, J. Misurda Presented by: Priyanka Puri SOFTTEST: A FRAMEWORK FOR SOFTWARE.
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.
Memory Management. History Run-time management of dynamic memory is a necessary activity for modern programming languages Lisp of the 1960’s was one of.
Presented by: Ofer Kiselov & Omer Kiselov Supervised by: Dmitri Perelman Final Presentation.
DMITRI PERELMAN IDIT KEIDAR TRANSACT 2010 SMV: Selective Multi-Versioning STM 1.
Lock vs. Lock-Free memory Fahad Alduraibi, Aws Ahmad, and Eman Elrifaei.
Mayur Naik Alex Aiken John Whaley Stanford University Effective Static Race Detection for Java.
1 CSE 326: Data Structures Hash Tables Autumn 2007 Lecture 14.
Programming in Java CSE301 Half Lecture Harry Erwin, PhD University of Sunderland.
Review for Test 2 i206 Fall 2010 John Chuang. 2 Topics  Operating System and Memory Hierarchy  Algorithm analysis and Big-O Notation  Data structures.
Peter Juszczyk CS 492/493 - ISGS. // Is this C# or Java? class TestApp { static void Main() { int counter = 0; counter++; } } The answer is C# - In C#
Data Access Patterns. Motivation Most software systems require persistent data (i.e. data that persists between program executions). In general, distributing.
(c) University of Washingtonhashing-1 CSC 143 Java Hashing Set Implementation via Hashing.
Parallel Programming in Java with Shared Memory Directives.
Making Object-Based STM Practical in Unmanaged Environments Torvald Riegel and Diogo Becker de Brum ( Dresden University of Technology, Germany)
Advanced Java Session 3 New York University School of Continuing and Professional Studies.
Automatic Data Partitioning in Software Transactional Memories Torvald Riegel, Christof Fetzer, Pascal Felber (TU Dresden, Germany / Uni Neuchatel, Switzerland)
Discovering and Understanding Performance Bottlenecks in Transactional Applications Ferad Zyulkyarov 1,2, Srdjan Stipic 1,2, Tim Harris 3, Osman S. Unsal.
HeuristicLab. Motivation  less memory pressure no DOM single pass linear process  less developer effort no interfaces to implement  modularity & flexibility.
Accelerating Precise Race Detection Using Commercially-Available Hardware Transactional Memory Support Serdar Tasiran Koc University, Istanbul, Turkey.
Jan 12, 2012 Introduction to Collections. 2 Collections A collection is a structured group of objects Java 1.2 introduced the Collections Framework Collections.
1 Effective Static Race Detection for Java Mayur, Alex, CS Department Stanford University Presented by Roy Ganor 14/2/08 Point-To Analysis Seminar.
Implications of Inheritance COMP204, Bernhard Pfahringer.
1162 JDK 5.0 Features Christian Kemper Principal Architect Borland.
WormBench A Configurable Application for Evaluating Transactional Memory Systems MEDEA Workshop Ferad Zyulkyarov 1, 2, Sanja Cvijic 3, Osman.
Packed Object Synchronization Introduction Many Java applications and frameworks must deal directly with native data. Packed Objects provide an approach.
Integrating and Optimizing Transactional Memory in a Data Mining Middleware Vignesh Ravi and Gagan Agrawal Department of ComputerScience and Engg. The.
Java 5 Part 1 CSE301 University of Sunderland Harry Erwin, PhD.
Advanced Java Programming CS 537 – Data Structures and Algorithms.
“Enthusiasm releases the drive to carry you over obstacles and adds significance to all you do.” – Norman Vincent Peale Thought for the Day.
Aritra Sengupta, Swarnendu Biswas, Minjia Zhang, Michael D. Bond and Milind Kulkarni ASPLOS 2015, ISTANBUL, TURKEY Hybrid Static-Dynamic Analysis for Statically.
JVSTM and its applications João Software Engineering Group.
Denis Caromel1 Institut universitaire de France (IUF) INRIA Sophia-Antipolis – CNRS – I3S – Université de Nice Luis Mateu DCC – Universidad de Chile Eric.
Lecture by: Prof. Pooja Vaishnav.  Language Processor implementations are highly influenced by the kind of storage structure used for program variables.
The ATOMOS Transactional Programming Language Mehdi Amirijoo Linköpings universitet.
SETS AND HASHING. SETS An un-ordered collection of values Operations (S and T are sets): S ∩ T // the intersection of S and T S U T // The Union of S.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Department of Computer Science MapReduce for the Cell B. E. Architecture Marc de Kruijf University of Wisconsin−Madison Advised by Professor Sankaralingam.
Java 5 Part 2 CSE301 University of Sunderland Harry Erwin, PhD.
Collections Data structures in Java. OBJECTIVE “ WHEN TO USE WHICH DATA STRUCTURE ” D e b u g.
Hash Tables From “Algorithms” (4 th Ed.) by R. Sedgewick and K. Wayne.
Dictionaries, Hash Tables, Collisions Resolution, Sets Svetlin Nakov Telerik Corporation
CoreDet: A Compiler and Runtime System for Deterministic Multithreaded Execution Tom Bergan Owen Anderson, Joe Devietti, Luis Ceze, Dan Grossman To appear.
On Implementing High Level Concurrency in Java G Stewart von Itzstein Mark Jasiunas University of South Australia.
High-level Interfaces for Scalable Data Mining Ruoming Jin Gagan Agrawal Department of Computer and Information Sciences Ohio State University.
Hany E. Ramadan and Emmett Witchel University of Texas at Austin TRANSACT 2/15/2009 The Xfork in the Road to Coordinated Sibling Transactions.
Real-Time Operating System Design
1 Principles revisited.NET: Two libraries: System.Collections System.Collections.Generics Data Structures and Collections.
Chapter - 2 Data strucuters for Language processing.
Object Model Baojian Hua What ’ s an Object Model? An object model dictates how to represent an object in memory A good object.
A Synchronized Block Join Point for AspectJ Chenchen Xi, Bruno Harbulot and John Gurd The University of Manchester Brussels, April 2008.
Eclipse Collections An Inside Look March 2016 Copyright © 2016 Goldman Sachs. All rights reserved.
1 Titanium Review: Language and Compiler Amir Kamil Titanium Language and Compiler Changes Amir Kamil U.C. Berkeley September.
OOPSLA Lab1 Chapter 7 Java Binding Prof. Hyoung-Joo Kim OOPSLA Lab. Dept. of Computer Engineering Seoul National University.
Coming up Implementation vs. Interface The Truth about variables Comparing strings HashMaps.
Memory Management in Java Mr. Gerb Computer Science 4.
Building Java Programs Generics, hashing reading: 18.1.
C11, Implications of Inheritance
Concurrency 2 CS 2110 – Spring 2016.
Sixth Lecture ArrayList Abstract Class and Interface
Distributed Systems - Comp 655
Introduction to Data Structure
Dynamic Performance Tuning of Word-Based Software Transactional Memory
Presentation transcript:

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 1

WTM’12, Bern, April 10, 2012 Motivation Fair comparison of different STM algorithms Require a flexible framework to support different STM implementations – Multi-version, lock-based, … – Same transactional interface – Same benchmarking applications 2

WTM’12, Bern, April 10, 2012 The DeuceSTM Transactions defined by a single Java method Well-defined API for implementing STM algorithms Efficient implementation of some STM algorithms, e.g., TL2, LSA, … Macro-benchmarks available  Does not allow the efficient implementation of other STM algorithms, e.g., multi-version  Fair comparison is not possible 3

WTM’12, Bern, April 10, 2012 Transactional Information Thread 1 Thread 2 Thread 3 … TxRead TxWrite TxRead Tx Desc. Clock = 3 Tx Desc. Clock = 2 Tx Desc. Clock = 3 Lock, version … Metainfo Memory Thread-local 4 Data

WTM’12, Bern, April 10, 2012 Out-place: N-1 5 … Lock Memory Efficient implementation using an hash function False sharing Algorithms: – TL2, SwissTM, LSA … External Mapping Table Lock Data

WTM’12, Bern, April 10, 2012 Out-place: … Version List Memory Version List Hash table with collision list Bad performance Algorithms: – Multi-version algorithms … External Mapping Table Data

WTM’12, Bern, April 10, 2012 In-place: Version List Direct access to metainfo using memory reference Mostly used in managed runtimes (OO languages) Algorithms: – TL2, SwissTM, LSA, Multi- version algorithms … Memory Data

WTM’12, Bern, April 10, 2012 Transactional Interface Out-place in DeuceSTM (obj 1,field) (obj 2,field) (obj 3,field) [metainfo 1 ] [metainfo 2 ] [metainfo 3 ] Metainfo table TxRead(obj, field) TxWrite(obj, field, val) TxRead(obj, field) TxWrite(obj, field, val) 8 Object instance Field offset Table Key

WTM’12, Bern, April 10, 2012 class C { int x; static int x_off = foo() { int t = TxRead(this, x_off ); TxWrite(this, x_off, t+1); } Out-place Instrumentation 9 class C { int foo() { x = x+1; }

WTM’12, Bern, April 10, 2012 TxRead(obj, field) TxWrite(obj, field, val) TxRead(obj, field) TxWrite(obj, field, val) Our In-place Approach 10 TxRead(metainfo) TxWrite(metainfo, val) TxRead(metainfo) TxWrite(metainfo, val) Transactional Interface

WTM’12, Bern, April 10, 2012 Our In-place Approach 11 class C { int foo() { x = x+1; } class C { int x; TxField x_m = new foo() { int t = TxRead(x_m); TxWrite(x_m, t+1); }

WTM’12, Bern, April 10, 2012 Metainfo and arrays 5 5 [0] 3 3 [1] 8 8 [2] Original array: int[] New array: TxArrField[] 12

WTM’12, Bern, April 10, 2012 Metainfo and arrays 13 class C { int[] a = new foo() { a[1] = a[2]+1; } void bar() { a[2] = 3; } class C { TxArrInt[] a = new TxArrInt[10]; { int[] t = new int[10]; for (int i=0; i < 10; i++) { a[i] = new TxArrInt(i, t); } TxField a_m = new foo() { int t = TxRead(a[2]); TxWrite(a[1], t+1); } void bar() { a[0].array[3] = 3; }

WTM’12, Bern, April 10, 2012 Experimental Evaluation Overhead Benchmarking algorithm: TL2 using a lock table Base case: – Using out-place strategy (original DeuceSTM) Comparing case: – Using in-place strategy Metainfo objects are created for each field We use the metainfo object as the key for the external lock table 14

WTM’12, Bern, April 10, 2012 Experimental Evaluation Overhead Write-Update: 0% Using Arrays No arrays: overhead 3% With arrays: overhead 20% 15 Not using Arrays Overhead in %

WTM’12, Bern, April 10, 2012 Experimental Evaluation Overhead Write-Update: 10% No arrays: overhead 7% With arrays: overhead 25% 16 Overhead in % Using Arrays Not using Arrays

WTM’12, Bern, April 10, 2012 Experimental Results In-place vs. Out-place for Multi-version Two implementations of JVSTM in DeuceSTM – Out-place strategy Versions kept in external table with collision list – In-place strategy No external table Versions kept in meta-info field How much faster is the in-place implementation? 17

WTM’12, Bern, April 10, 2012 Experimental Evaluation Multi-version Average 5 times faster 18 Speedup in X faster Using Arrays Not using Arrays Write-Update: 10%

WTM’12, Bern, April 10, 2012 Experimental Results Multi-version JVSTM algorithm has a performance bottleneck in garbage collection of unused versions – Is it limiting the speedup for in-place? JVSTM-noGC: an extension of JVSTM where – Version lists are fixed sized – No garbage collection of unused versions 19

WTM’12, Bern, April 10, 2012 Experimental Evaluation Multi-version Average 20—25 times faster 20 Speedup in X faster Using Arrays Not using Arrays Write-Update: 10%

WTM’12, Bern, April 10, 2012 Experimental Evaluation JVSTM vs TL2 21 Using Arrays Not using Arrays Write-Update: 10%

WTM’12, Bern, April 10, 2012 Concluding Remarks In-place strategy support allows: – Efficient support of primitive types Avoids boxing and unboxing – Efficient Implementation of multi-version algorithms – Fair comparison of different kinds of STM algorithms – Support for distributed STM algorithms Ongoing work 22

WTM’12, Bern, April 10, 2012 The End 23