Exploring the relations between STM and DB consistency conditions Sandeep Hans Technion Joint work with Hagit Attiya.

Slides:



Advertisements
Similar presentations
CSL 771: Database Implementation Transaction Processing
Advertisements

Introduction to Database Systems1 Concurrency Control CC.Lecture 1.
Impossibilities for Disjoint-Access Parallel Transactional Memory : Alessia Milani [Guerraoui & Kapalka, SPAA 08] [Attiya, Hillel & Milani, SPAA 09]
IDA / ADIT Lecture 10: Database recovery Jose M. Peña
TRANSACTION PROCESSING SYSTEM ROHIT KHOKHER. TRANSACTION RECOVERY TRANSACTION RECOVERY TRANSACTION STATES SERIALIZABILITY CONFLICT SERIALIZABILITY VIEW.
Chapter 15: Transactions Transaction Concept Transaction Concept Concurrent Executions Concurrent Executions Serializability Serializability Testing for.
1 Part V: Transactions, Concurrency control, Scheduling, and Recovery.
Transactions (Chapter ). What is it? Transaction - a logical unit of database processing Motivation - want consistent change of state in data Transactions.
(c) Oded Shmueli Transactions Lecture 1: Introduction (Chapter 1, BHG) Modeling DB Systems.
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.
1 ICS 214B: Transaction Processing and Distributed Data Management Lecture 6: Cascading Rollbacks, Deadlocks, and Long Transactions Professor Chen Li.
CS4432: Database Systems II Lecture #26 Concurrency Control and Recovery Professor Elke A. Rundensteiner.
Consistency Conditions for STM Sandeep Hans. Agenda Database Consistency Conditions STM Consistency Conditions A different perspective Consistency with.
A Programming Language View of Transactional Memory Hagit Attiya, Technion Joint work with Sandeep Hans, Alexey Gotsman and Noam Rinetzky Published in.
Quick Review of Apr 29 material
Idit Keidar and Dmitri Perelman Technion 1 SPAA 2009.
Algorithmics for Software Transactional Memory Hagit Attiya Technion.
Chapter 7 Transactions 7.1 Transaction Concept 7.2 Transaction State 7.3 Implementation of Atomicity and Durability 7.4 Concurrent Executions 7.5 Serializability.
1 Concurrency Control and Recovery Module 6, Lecture 1.
The Cost of Privatization Hagit Attiya Eshcar Hillel Technion & EPFLTechnion.
1 Introduction to Transaction Processing (1)
Transactions Amol Deshpande CMSC424. Today Project stuff… Summer Internships 
Transaction Processing
CS4432transaction management1 CS4432: Database Systems II Lecture #23 Transaction Management Professor Elke A. Rundensteiner.
1 Concurrency Control. 2 Transactions A transaction is a list of actions. The actions are reads (written R T (O)) and writes (written W T (O)) of database.
1 Transaction Management Overview Chapter Transactions  Concurrent execution of user programs is essential for good DBMS performance.  Because.
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Chapter 18.
DB Transactions CS143 Notes TRANSACTION: A sequence of SQL statements that are executed "together" as one unit:
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Lecture 21 Ramakrishnan - Chapter 18.
Database Systems/COMP4910/Spring05/Melikyan1 Transaction Management Overview Unit 2 Chapter 16.
1 Transaction Management Overview Chapter Transactions  Concurrent execution of user programs is essential for good DBMS performance.  Because.
SCUJoAnne Holliday11–1 Schedule Today: u Transaction concepts. u Read Sections Next u Authorization and security.
1 Transaction Processing Chapter Transaction Concept A transaction is a unit of program execution that accesses and possibly updates various data.
1 Concurrency Control II: Locking and Isolation Levels.
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Instructor: Xintao Wu.
©Silberschatz, Korth and Sudarshan15.1Database System Concepts Chapter 15: Transactions Transaction Concept Transaction State Implementation of Atomicity.
Transactions. What is it? Transaction - a logical unit of database processing Motivation - want consistent change of state in data Transactions developed.
1 Concurrency Control Chapter Conflict Serializable Schedules  Two schedules are conflict equivalent if:  Involve the same actions of the same.
Degrees of Isolation – A Theoretical Formulation Presented by Balaji Sethuraman.
1 CSE 480: Database Systems Lecture 24: Concurrency Control.
1 CSE232A: Database System Principles More Concurrency Control and Transaction Processing.
Transaction Management and Recovery, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Chapter 18.
1 Database Systems ( 資料庫系統 ) December 27/28, 2006 Lecture 13 Merry Christmas & New Year.
SHUJAZ IBRAHIM CHAYLASY GNOPHANXAY FIT, KMUTNB JANUARY 05, 2010 Distributed Database Systems | Dr.Nawaporn Wisitpongphan | KMUTNB Based on article by :
Database Isolation Levels. Reading Database Isolation Levels, lecture notes by Dr. A. Fekete, resentation/AustralianComputer.
Jinze Liu. ACID Atomicity: TX’s are either completely done or not done at all Consistency: TX’s should leave the database in a consistent state Isolation:
Relaxed Currency Serializability for Middle-Tier Caching and Replication Philip A. Bernstein, Alan Fekete, Hongfei Guo, Raghu Ramakrishnan, Pradeep Tamma.
MULTIUSER DATABASES : Concurrency and Transaction Management.
1 Concurrency Control. 2 Why Have Concurrent Processes? v Better transaction throughput, response time v Done via better utilization of resources: –While.
Database System Implementation CSE 507
Database Transaction Abstraction I
Transaction Management
Transaction Management Overview
Database Systems (資料庫系統)
Transaction Management
Transaction Management Overview
Temple University – CIS Dept. CIS661 – Principles of Data Management
Transaction Management
Transaction Management Overview
Database Transactions
Distributed Transactions
Transaction Management
Ranjeet Kumar K. Vidyasankar Memorial University St. John’s CANADA
Transaction Management Overview
C. Faloutsos Transactions
Temple University – CIS Dept. CIS616– Principles of Data Management
Transaction Management Overview
Presentation transcript:

Exploring the relations between STM and DB consistency conditions Sandeep Hans Technion Joint work with Hagit Attiya

Database vs. STM DatabaseSTM

Beyond Serializability Recoverability Avoiding Cascading Aborts Strictness Rigorousness [Transactional Information Systems. Gerhard Weikum, Gottfried Vossen.] [Concurrency Control and Recovery in Database Systems. Philip A. Bernstein, Vassos Hadzilacos, Nathan Goodman] RG ST ACA RC

Problem with Aborts T 1 writes x. T 2 reads x written by T 1. T 2 commits, T 1 aborts. c2c2 w 1 (x,1) a1a1 T1T1 r 2 (x,1) T2T2 RG ST ACA RC

Recoverability T 1 writes x. T 2 reads x written by T 1. T 1 should commit before T 2 commits. c2c2 c1c1 T1T1 w 1 (x,1) r 2 (x,1) T2T2 RG ST ACA RC [Hadzilacos 83]

Problem: Cascading Aborts c1c1 r 2 (x,1)c2c2 a1a1 T1T1 w 1 (x,1) T2T2 a2a2 RG ST ACA RC

Avoiding Cascading Aborts T 1 should commit before T 2 commits reads x. T1T1 T2T2 w 1 (x,1) r 2 (x,1) c1c1 c2c2 RG ST ACA RC

Problem: Undo T 1 writes x=1. T 2 writes x=2 and commits. T 1 aborts. w 1 (x,1) T1T1 T2T2 w 2 (x,2) a1a1 c2c2 RG ST ACA RC

Strictness No data item is read or overwritten unless the transaction that wrote it has ended. T1T1 w 1 (x,1)c 1 /a 1 r 2 (x,1) T2T2 w 3 (x,2) T3T3 RG ST ACA RC

Rigorousness No data item is read or overwritten unless the transaction that read/wrote it has ended. T1T1 w 1 (x,1)c 1 /a 1 r 2 (x,1) T2T2 w 3 (x,2) T3T3 c 2 /a 2 RG ST ACA RC [Breitbart, Georgakopoulos, Rusinkiewicz & Silberschatz, 1991]

STM Conditions Opacity – Guerraoui and Kapalka [ PPoPP’08] – Sequential specification of shared objects. Virtual World Consistency – Imbs and Raynal [SIROCCO’09] – Causal past of a transaction. Weakest Reasonable Condition – Doherty, Groves, Luchangco, Moir [REFINE’09] VWC Opacity VWC

Bridging the Gap ? ? RG ST ACA RC VWC Opacity VWC

T1T1 T3T3 T2T2 Opacity Graph (OPG) w 1 (x,1) c1c1 r 2 (x,1) r 3 (x,0) a3a3 w 3 (x,3) T0T0 T3T3 T1T1 T2T2 vis loc ww rf rw rf rt Theorem: A history is opaque  its opacity graph is ACYCLIC Vertices – Visible (vis) – Local (loc) Edges Real Time (rt) Read From (rf) Write Before (ww) Read Before (rw) [Principles of Transactional Memory. Rachid Guerraoui, Michal Kapalka ]

Opacity Graph for Rigorousness T1T1 TnTn T2T2 T3T3 Suppose there is a cycle {T 1, T 2, T 3,…T n } Four types of edges: rt edge: T i completes before T j rf, ww, rw edges, then either a)T j reads from T i b)T j overwrites value written by T i c)T i reads a value over written by T j and T i must complete before T j. T 1 must complete before T 2, which should complete before T 3 etc.  T n must complete before T 1, which is not possible. Opacity graph of a rigorous TM history is ACYCLIC.

Opacity and Rigorousness Opacity graph of a rigorous TM history is ACYCLIC. Rigorousness ⊆ Opacity Rigorousness ≠ Opacity T1T1 w 1 (x,1) c1c1 T2T2 w 2 (x,2) r 1 (x,1) c2c2

T1T1 What about Strictness? w 1 (x,1) c1c1 T2T2 r 1 (x,1) c2c2 T1T1 w1(x,1) c1c1 T2T2 r 2 (x,1) T3T3 w 3 (x,2) c3c3 w 3 (y,3) r 2 (y,3) c2c2 Strictness  Opacity Strictness Opacity  Strictness ⊅ Opacity Strictness ⊄ Opacity

A Revised Landscape… Recoverability ACA Strictness Rigorousness VWC Opacity

Wrap Up Motivation for database and STM consistency conditions is similar yet perspectives differ. Inclusion relations might change when additional properties are introduced, e.g., – Update on commit – Liveness properties

Thank You