Software Transactional Objects Guy Eddon Maurice Herlihy TRAMP 2007.

Slides:



Advertisements
Similar presentations
Basic Java Constructs and Data Types – Nuts and Bolts
Advertisements

Copyright © 2002 Pearson Education, Inc. Slide 1.
Chapter 6 Structures and Classes. Copyright © 2006 Pearson Addison-Wesley. All rights reserved. 6-2 Learning Objectives Structures Structure types Structures.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 10 Servlets and Java Server Pages.
Chapter 11 Introduction to Programming in C
Bounded Model Checking of Concurrent Data Types on Relaxed Memory Models: A Case Study Sebastian Burckhardt Rajeev Alur Milo M. K. Martin Department of.
FIGURE 11.1 Discrete Time Signals.. FIGURE 11.2 Step Function.
Building a Knowledge Management System as a Life Cycle
Combining Like Terms. Only combine terms that are exactly the same!! Whats the same mean? –If numbers have a variable, then you can combine only ones.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
and 6.855J Cycle Canceling Algorithm. 2 A minimum cost flow problem , $4 20, $1 20, $2 25, $2 25, $5 20, $6 30, $
Introduction to C Programming
Credit hours: 4 Contact hours: 50 (30 Theory, 20 Lab) Prerequisite: TB143 Introduction to Personal Computers.
3 Copyright © 2005, Oracle. All rights reserved. Basic Java Syntax and Coding Conventions.
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
0 - 0.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
1 Interprocess Communication 1. Ways of passing information 2. Guarded critical activities (e.g. updating shared data) 3. Proper sequencing in case of.
Uncovering Performance Problems in Java Applications with Reference Propagation Profiling PRESTO: Program Analyses and Software Tools Research Group, Ohio.
1 Software Unit Test Coverage And Test Adequacy Hong Zhu, Patrick A. V. Hall, John H.R. May Presented By: Arpita Gandhi.
Linked Lists.
Data Structures ADT List
The List Type Lecture 9 Hartmut Kaiser
1 Symbol Tables. 2 Contents Introduction Introduction A Simple Compiler A Simple Compiler Scanning – Theory and Practice Scanning – Theory and Practice.
Operating Systems: Monitors 1 Monitors (C.A.R. Hoare) higher level construct than semaphores a package of grouped procedures, variables and data i.e. object.
Dynamic Determinism Checking for Structured Parallelism Edwin Westbrook 1, Raghavan Raman 2, Jisheng Zhao 3, Zoran Budimlić 3, Vivek Sarkar 3 1 Kestrel.
5.9 + = 10 a)3.6 b)4.1 c)5.3 Question 1: Good Answer!! Well Done!! = 10 Question 1:
1 Directed Depth First Search Adjacency Lists A: F G B: A H C: A D D: C F E: C D G F: E: G: : H: B: I: H: F A B C G D E H I.
Code Correctness, Readability, Maintainability Svetlin Nakov Telerik Corporation
1© DATOS Computer AG – The Framework for higher Efficiency Tool Catalogs Documents + Planning Assembly + Logistics Storage Systems Job.
Introduction to Compilation of Functional Languages Wanhe Zhang Computing and Software Department McMaster University 16 th, March, 2004.
Past Tense Probe. Past Tense Probe Past Tense Probe – Practice 1.
Processes Management.
Addition 1’s to 20.
Concurrent programming for dummies (and smart people too) Tim Harris & Keir Fraser.
Test B, 100 Subtraction Facts
Week 1.
1 Ke – Kitchen Elements Newport Ave. – Lot 13 Bethesda, MD.
Karlstad University Computer Science Design Contracts and Error Management Design Contracts and Errors A Software Development Strategy Eivind J. Nordby.
Chapter 13 – Introduction to Classes
Introduction to Recursion and Recursive Algorithms
Threads Cannot be Implemented As a Library Andrew Hobbs.
Foundations of Data Structures Practical Session #11 Sort properties, Quicksort algorithm.
Reliable and Efficient Programming Abstractions for Sensor Networks Nupur Kothari, Ramki Gummadi (USC), Todd Millstein (UCLA) and Ramesh Govindan (USC)
Transactional Locking Nir Shavit Tel Aviv University (Joint work with Dave Dice and Ori Shalev)
1 JAC : Aspect Oriented Programming in Java An article review by Yuval Nir and Limor Lahiani.
Thread-Level Transactional Memory Decoupling Interface and Implementation UW Computer Architecture Affiliates Conference Kevin Moore October 21, 2004.
Shared Counters and Parallelism Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
Language Support for Lightweight transactions Tim Harris & Keir Fraser Presented by Narayanan Sundaram 04/28/2008.
Parallel Programming in Java with Shared Memory Directives.
Software Transactional Memory for Dynamic-Sized Data Structures Maurice Herlihy, Victor Luchangco, Mark Moir, William Scherer Presented by: Gokul Soundararajan.
View-Oriented Parallel Programming for multi-core systems Dr Zhiyi Huang World 45 Univ of Otago.
SXM: Software Transactional Memory in C# Maurice Herlihy.
CSE 425: Data Types I Data and Data Types Data may be more abstract than their representation –E.g., integer (unbounded) vs. 64-bit int (bounded) A language.
Why STMs Need Compilers (a war story) Maurice Herlihy Brown University.
Non-Blocking Concurrent Data Objects With Abstract Concurrency By Jack Pribble Based on, “A Methodology for Implementing Highly Concurrent Data Objects,”
CS510 Concurrent Systems Jonathan Walpole. A Methodology for Implementing Highly Concurrent Data Objects.
How D can make concurrent programming a piece of cake Bartosz Milewski D Programming Language.
CoreDet: A Compiler and Runtime System for Deterministic Multithreaded Execution Tom Bergan Owen Anderson, Joe Devietti, Luis Ceze, Dan Grossman To appear.
R 1 Transactional abstractions: beyond atomic update Tim Harris r.
Maurice Herlihy, Victor Luchangco, Mark Moir, William N. Scherer III
Part 2: Software-Based Approaches
Faster Data Structures in Transactional Memory using Three Paths
Maurice Herlihy, Victor Luchangco, Mark Moir, William N. Scherer III
The Challenge of Cross - Language Interoperability
Relaxed Consistency Finale
Presentation transcript:

Software Transactional Objects Guy Eddon Maurice Herlihy TRAMP 2007

2 Language/Library support for Transactions Lots of worn on unmanaged languages –word-based What about managed languages? –Objects, GC, bounds checks, structured exceptions? –Java, C#? Different concerns

3 Prior STM Work Awkward user interface –Long-lived transactional wrappers vs –Short-lived versions Programmer conventions –List element points to wrapper which points to list …. –Dont use short-lived objects beyond lifetime ….

4 public class List { public int item; public TMObject next; } Old-School Atomic Classes Next field is explicit wrapper

5 List next = list.next.OpenRead(); Old-School Atomic Classes Explicit open (specify read or write)

6 List next = list.next.OpenRead(); Old-School Atomic Classes Must discard after transaction, dont modify, etc…

7 List rVersion = list.next.OpenRead(); Old-School Atomic Classes Read version unchanged Read version changed List wVersion = list.next.OpenWrite(); wVersion.item++; List wVersion = list.next.OpenWrite(); List rVersion = list.next.OpenRead();

8 Software Transactional Memory Library approach Intercept field accesses –SXM (C#) –DSTM2 (Java) Programmer use factories –Input is interface –Synthesize code to intercept field accesses

9 Examples node.Key = 42; // C# property style Node.setKey(42); // Java EJB style

10 Examples node.Key = 42; // C# property style Node.setKey(42); // Java EJB style try { T version = (T) start.get().newVersion; final Method method = version.getClass().getMethod(methodName, _class); return new Adapter.Setter () { public void call(V value) { try { ThreadState state = Thread.getLocalState(); …

11 Advantages Strong Atomicity –Detects transactional/non-transactional race conditions Natural programming style –Almost sequential –No complex conventions

12 Disadvantages Efficiency, efficiency, efficiency –Even with fast-path optimizations Solution –Use flow analysis to remove synchronization –Use MSFT Phoenix compiler

13 Lock-Based Runtime

14 Obstruction-Free Run-Time

15 Locking vs Obstruction-Free

16 Conclusions Managed languages are also important Simple flow analysis goes a long way Do not rule out non-blocking algorithms yet

17 Clip Art