Abort Free SemanticTM by Dependency Aware Scheduling of Transactional Instructions Shlomi Dolev Ben-Gurion University of the Negev Israel WTM 2013 Panagiota.

Slides:



Advertisements
Similar presentations
Optimistic Methods for Concurrency Control By : H.T. Kung & John T. Robinson Presenters: Munawer Saeed.
Advertisements

School of EECS, Peking University “Advanced Compiler Techniques” (Fall 2011) Parallelism & Locality Optimization.
Impossibilities for Disjoint-Access Parallel Transactional Memory : Alessia Milani [Guerraoui & Kapalka, SPAA 08] [Attiya, Hillel & Milani, SPAA 09]
Architecture-dependent optimizations Functional units, delay slots and dependency analysis.
Principles of Transaction Management. Outline Transaction concepts & protocols Performance impact of concurrency control Performance tuning.
1 Chapter Five Selection and Repetition. 2 Objectives How to make decisions using the if statement How to make decisions using the if-else statement How.
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.
Concurrency Control.
Sathya Peri, IIT Patna, India, K.Vidyasankar, Memorial University, St John’s, Canada, 1 Efficient Non-Blocking.
PARALLEL PROGRAMMING with TRANSACTIONAL MEMORY Pratibha Kona.
DMITRI PERELMAN IDIT KEIDAR TRANSACT 2010 SMV: Selective Multi-Versioning STM 1.
1 Lecture 21: Transactional Memory Topics: consistency model recap, introduction to transactional memory.
Introduction to Analysis of Algorithms
Synchronization. Physical Clocks Solar Physical Clocks Cesium Clocks International Atomic Time Universal Coordinate Time (UTC) Clock Synchronization Algorithms.
1 Lecture 23: Transactional Memory Topics: consistency model recap, introduction to transactional memory.
Loops – While, Do, For Repetition Statements Introduction to Arrays
Language Support for Lightweight transactions Tim Harris & Keir Fraser Presented by Narayanan Sundaram 04/28/2008.
Database Management Systems I Alex Coman, Winter 2006
Transactions Amol Deshpande CMSC424. Today Project stuff… Summer Internships 
ECE122 L9: While loops March 1, 2007 ECE 122 Engineering Problem Solving with Java Lecture 9 While Loops.
TRANSACTIONS AND CONCURRENCY CONTROL Sadhna Kumari.
An Introduction to Software Transactional Memory
Exercise problems for students taking the Programming Parallel Computers course. Janusz Kowalik Piotr Arlukowicz Tadeusz Puzniakowski Informatics Institute.
Fundamentals of C and C++ Programming Control Structures and Functions.
Chapter 4: Decision Making with Control Structures and Statements JavaScript - Introductory.
Lecture 4. RAM Model, Space and Time Complexity
DB Transactions CS143 Notes TRANSACTION: A sequence of SQL statements that are executed "together" as one unit:
02/23/2005Yan Huang - CSCI5330 Database Implementation – Transaction Transaction.
Thread-Level Speculation Karan Singh CS
Performance Prediction for Random Write Reductions: A Case Study in Modelling Shared Memory Programs Ruoming Jin Gagan Agrawal Department of Computer and.
Chapter 8 Iteration Dept of Computer Engineering Khon Kaen University.
More on Logic Today we look at the for loop and then put all of this together to look at some more complex forms of logic that a program will need The.
©Silberschatz, Korth and Sudarshan15.1Database System Concepts Chapter 15: Transactions Transaction Concept Transaction State Implementation of Atomicity.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
© Janice Regan, CMPT 128, Jan CMPT 128: Introduction to Computing Science for Engineering Students Introduction to branching.
Transactional Coherence and Consistency Presenters: Muhammad Mohsin Butt. (g ) Coe-502 paper presentation 2.
Threads Cannot be Implemented as a Library Hans-J. Boehm.
Chapter 15 JavaScript: Part III The Web Warrior Guide to Web Design Technologies.
CPS120 Introduction to Computer Science Iteration (Looping)
1 Standard Version of Starting Out with C++, 4th Brief Edition Chapter 5 Looping.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5: Looping.
 Control Flow statements ◦ Selection statements ◦ Iteration statements ◦ Jump statements.
Copyright © 2012 Pearson Education, Inc. Chapter 5: Loops.
Timestamp-based Concurrency Control
Chapter Looping 5. The Increment and Decrement Operators 5.1.
SHUJAZ IBRAHIM CHAYLASY GNOPHANXAY FIT, KMUTNB JANUARY 05, 2010 Distributed Database Systems | Dr.Nawaporn Wisitpongphan | KMUTNB Based on article by :
More on Logic Today we look at the for loop and then put all of this together to look at some more complex forms of logic that a program will need The.
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
Chapter Looping 5. The Increment and Decrement Operators 5.1.
Lecture 7 – Repetition (Loop) FTMK, UTeM – Sem /2014.
H.Lu/HKUST L06: Concurrency Control & Locking. L06: Concurrency Control & Locking - 2 H.Lu/HKUST Transactions  Concurrent execution of user programs.
Computer Science Lecture 13, page 1 CS677: Distributed OS Last Class: Canonical Problems Election algorithms –Bully algorithm –Ring algorithm Distributed.
IThreads A Threading Library for Parallel Incremental Computation Pramod Bhatotia Pedro Fonseca, Björn Brandenburg (MPI-SWS) Umut Acar (CMU) Rodrigo Rodrigues.
Control Structures: Examples. for-loop example Q: If a=1, b=3, and x=7, what is the value of x when the loop terminates? A: x=1 for(k=a; k
Novel Paradigms of Parallel Programming Prof. Smruti R. Sarangi IIT Delhi.
© 2006 Pearson Education Chapter 3 Part 2 More about Strings and Conditional Statements Loops (for and while) 1.
Last Class: Canonical Problems
Algorithm Analysis CSE 2011 Winter September 2018.
Lecture 6: Transactions
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
Part 1: Concepts and Hardware- Based Approaches
Chapter 8: More on the Repetition Structure
Hybrid Transactional Memory
Computer Science Core Concepts
Based on slides created by Bjarne Stroustrup & Tony Gaddis
Programming with Shared Memory Specifying parallelism
Lecture: Consistency Models, TM
Problems with Locks Andrew Whitaker CSE451.
Outline Introduction Background Distributed DBMS Architecture
Presentation transcript:

Abort Free SemanticTM by Dependency Aware Scheduling of Transactional Instructions Shlomi Dolev Ben-Gurion University of the Negev Israel WTM 2013 Panagiota Fatourou University of Crete & FORTH-ICS Greece Eleftherios Kosmas University of Crete & FORTH-ICS Greece

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas  When two transactions conflict, most TM systems abort one of them to ensure consistency  Ideally:  All transactions should commit  Parallelism should not be sacrificed  TMs that never abort transactions are highly desirable  support of irrevocable transactions  avoid the cost of re-executing aborted transactions Two transactions conflict, if they both access the same t-variable and at least one of these accesses is a write Introduction

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas SemanticTM  an opaque TM algorithm  no transaction ever aborts guarantees wait-freedom/local progress for the execution of transactions  fine-grain parallelism at the transactional instruction level An execution of a TM algorithm is opaque if it satisfies strict serializability and active transactions read “consistent” values for t-variables Our Result

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas Transaction Level Parallelism p1p1 p2p2 pnpn 2. T 1.read(z) x yzw 1. T 1.read(x) 5. T 1.write(w) 4. T 1.read(w) 3. T 1.write(y) T 2.read T 2.write T 2.read T m.read T2T2 T1T1 TmTm

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas Transactional Instruction Level Parallelism p1p1 p2p2 pnpn 2. T1.read x yzw 1. T1.read 5. T1.write 4. T1.read 3. T1.write  dependencies may exist between instructions of the same transaction T2. read T2. write T2. read Tm. read T2T2 TmTm

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas SemanticTM p1p1 p2p2 pnpn T1.read x yz w T1.write T1.read T1.write T2.readT2.write T2.read Tm.read t-var lists  a scheduler places transactional intructions into t-var lists  together with their dependencies  transactions are processed by the scheduler the one after the other  each process randomly chooses a t-var list and executes its ready instructions  no conflicts occur between transactions p3p3  For relatively simple transactions the work of the scheduler can be done at compile time.

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas  If the execution of a transactional instruction e 2 depends on the execution of a transactional instruction e 1  there is a dependency between e 1 and e 2 input dependency for e 2 output dependency for e 1  A dependency between  a read and a write instruction → data dependency  a cond and a read (or a write) instruction → control dependency Dependencies x:=3 x++ y:=x if ( ) then x:=1 x+y = 5

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas x:=3 x++ y:=x write(x,3) tmp 1 := read(x) write(x,tmp 1 +1) tmp 2 := read(x) write(y,tmp 2 ) write 0 0 xy read write data dep p1p1 p2p2 read Reads and Writes

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas if(x+y = 5) then x := 1 tmp 1 := read(x) tmp 2 := read(y) tmp 3 := tmp 1 +tmp 2 cond(tmp 3 =5) write(x,1) xy read cond write data dep control dep p1p1 p2p2  If cond evaluates to TRUE then the write is executed  Otherwise it is invalidated read Conditionals – if statement

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas if(x = 1) then x := 2 else x := 4 y := x tmp 1 := read(x) cond(tmp 1 = 1) write(x,2) cond(tmp 1 <> 1) write (x,4) tmp 2 := read(x) write(y,tmp 2 ) xy readwrite cond write read data dep control dep p1p1 p2p2 Conditionals – if..else statements 04 04

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas Loops while(x < 10) do y := x x := 2* x tmp 1 := read(x) cond(tmp 1 < 10, loop) tmp 2 := read(x) write(y,tmp 2 ) tmp 3 := 2 * tmp 2 write(x,tmp 3 ) tmp 1 := read(x) xy read cond read write read control dep data dep across iteration data dep

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas Loops 0 1 xy read cond read output data dep control dep write read across iteration data dep Metadata while (x < 10) y := x x := x* Metadata p1p1 p2p

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas Synchronization for each transactional instruction  status ( ACTIVE, DONE ) together with the value of each input data dependency  iteration number  CAS object for each control dependency  CAS object x y status val iter for the value of each t- variable  version  CAS object  update using oldvalue iteration number CAS object valread ver 1 oldval iter write 1

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas Support of transactions accessing t-variables that are known at run time  accessing an element of an array Extensions A[1] A[2]A[3]A[m] read write read read: A[*] write: A[*] read: A[3] write: A[2] read: A[*] write: A[*] A[*] Dynamic transactions  similar strategy as above, if we consider the memory heap as an array Nested conditionals & loops (cond c2 in the block of outer cond c1)  add a control dependency from c1 to c2 but not to the instructions of the block of c2.

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas Summary We presented SemanticTM:  executes transactions without ever causing any aborts  parallelism is fine-grained achieved at the level of transactional instructions Blocking version of SemanticTM Future Work Implement an optimized version of SemanticTM Experimental Study Conclusion & Future Work

WTM 2013 S. Dolev & P. Fatourou & E. Kosmas QUESTIONS? Thank you!