1 Lecture 10: TM Pathologies Topics: scalable lazy implementation, paper on TM performance pathologies.

Slides:



Advertisements
Similar presentations
CM20145 Concurrency Control
Advertisements

Optimistic Methods for Concurrency Control By : H.T. Kung & John T. Robinson Presenters: Munawer Saeed.
Chapter 16 Concurrency. Topics in this Chapter Three Concurrency Problems Locking Deadlock Serializability Isolation Levels Intent Locking Dropping ACID.
1 Concurrency Control Chapter Conflict Serializable Schedules  Two actions are in conflict if  they operate on the same DB item,  they belong.
ICS Principles of Operating Systems Lectures 8 and 9 - Deadlocks Prof. Dmitri V. Kalashnikov dvk ics.uci.edu Slides © Prof. Nalini Venkatasubramanian.
1 Lecture 18: Transactional Memories II Papers: LogTM: Log-Based Transactional Memory, HPCA’06, Wisconsin LogTM-SE: Decoupling Hardware Transactional Memory.
Concurrency Control II
Concurrency Control.
Lecture 11 Recoverability. 2 Serializability identifies schedules that maintain database consistency, assuming no transaction fails. Could also examine.
CSC 322 Operating Systems Concepts Lecture - 29: by
1 Lecture 21: Transactional Memory Topics: consistency model recap, introduction to transactional memory.
1 Lecture 7: Transactional Memory Intro Topics: introduction to transactional memory, “lazy” implementation.
Chapter 7: Deadlocks. 7.2 Chapter Objectives To develop a description of deadlocks, which prevent sets of concurrent processes from completing their tasks.
1 Lecture 8: Eager Transactional Memory Topics: implementation details of eager TM, various TM pathologies.
1 Lecture 8: Transactional Memory – TCC Topics: “lazy” implementation (TCC)
1 Lecture 24: Transactional Memory Topics: transactional memory implementations.
Transaction Management
1 Lecture 6: TM – Eager Implementations Topics: Eager conflict detection (LogTM), TM pathologies.
1 Lecture 6: Lazy Transactional Memory Topics: TM semantics and implementation details of “lazy” TM.
1 Lecture 5: TM – Lazy Implementations Topics: TM design (TCC) with lazy conflict detection and lazy versioning, intro to eager conflict detection.
1 Lecture 4: Directory Protocols and TM Topics: corner cases in directory protocols, lazy TM.
1 Lecture 9: TM Implementations Topics: wrap-up of “lazy” implementation (TCC), eager implementation (LogTM)
©Silberschatz, Korth and Sudarshan16.1Database System Concepts 3 rd Edition Chapter 16: Concurrency Control Lock-Based Protocols Timestamp-Based Protocols.
1 Lecture 7: Lazy & Eager Transactional Memory Topics: details of “lazy” TM, scalable lazy TM, implementation details of eager TM.
Concurrency Control John Ortiz.
1 Lecture 10: TM Implementations Topics: wrap-up of eager implementation (LogTM), scalable lazy implementation.
LogTM: Log-Based Transactional Memory Kevin E. Moore, Jayaram Bobba, Michelle J. Moravan, Mark D. Hill, & David A. Wood Presented by Colleen Lewis.
© 1997 UW CSE 11/13/97N-1 Concurrency Control Chapter 18.1, 18.2, 18.5, 18.7.
TRANSACTIONS AND CONCURRENCY CONTROL Sadhna Kumari.
Deadlocks in Distributed Systems Deadlocks in distributed systems are similar to deadlocks in single processor systems, only worse. –They are harder to.
Reduced Hardware NOrec: A Safe and Scalable Hybrid Transactional Memory Alexander Matveev Nir Shavit MIT.
Chapter 11 Concurrency Control. Lock-Based Protocols  A lock is a mechanism to control concurrent access to a data item  Data items can be locked in.
Chapter 15 Concurrency Control Yonsei University 1 st Semester, 2015 Sanghyun Park.
Concurrency Server accesses data on behalf of client – series of operations is a transaction – transactions are atomic Several clients may invoke transactions.
II.I Selected Database Issues: 2 - Transaction ManagementSlide 1/20 1 II. Selected Database Issues Part 2: Transaction Management Lecture 4 Lecturer: Chris.
Chapter 16 Concurrency. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.16-2 Topics in this Chapter Three Concurrency Problems Locking Deadlock.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 28 Handling Deadlock.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 7: Deadlocks.
Page 1 Concurrency Control Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Lec 9 Concurrency Control Techniques.
© 2008 Multifacet ProjectUniversity of Wisconsin-Madison Pathological Interaction of Locks with Transactional Memory Haris Volos, Neelam Goyal, Michael.
Chapter 7: Deadlock Course Administration n Midterm exam next week in class l Closed book n Final exam time changed to during class.
6.830 Lecture 14 Two-phase Locking Recap Optimistic Concurrency Control 10/28/2015.
1 Lecture 10: Transactional Memory Topics: lazy and eager TM implementations, TM pathologies.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 15 : Concurrency.
DBMS Deadlock.
Lecture 6 Deadlock 1. Deadlock and Starvation Let S and Q be two semaphores initialized to 1 P 0 P 1 wait (S); wait (Q); wait (Q); wait (S);. signal (S);
Minh, Trautmann, Chung, McDonald, Bronson, Casper, Kozyrakis, Olukotun
Lecture 3 Concurrency control techniques
Concurrency Control.
Lecture 9: Directory-Based Examples II
Lecture 11: Transactional Memory
Lecture 12: TM, Consistency Models
Lecture: Consistency Models, TM
Lecture 6: Transactions
Lecture 17: Transactional Memories I
Lecture 21: Transactional Memory
Liveness And Performance
Chapter 7: Deadlocks.
Ch 22: Databases Concurrency Control
Chapter 15 : Concurrency Control
Lecture 27 Syed Mansoor Sarwar
Performance Pathologies in Hardware Transactional Memory
Concurrency Control Techniques
Performance Pathologies in Hardware Transactional Memory
Lecture 23: Transactional Memory
Lecture 21: Transactional Memory
CONCURRENCY Concurrency is the tendency for different tasks to happen at the same time in a system ( mostly interacting with each other ) .   Parallel.
Lecture: Transactional Memory
A. Berrached::cms::uhd
Presentation transcript:

1 Lecture 10: TM Pathologies Topics: scalable lazy implementation, paper on TM performance pathologies

2 Scalable Lazy Commit Algorithm Transactions that deal with different directories must proceed in parallel; transactions that deal with the same directory must necessarily be serialized Before committing, a transaction must make sure there are no conflicts for its directories Each directory has a token and a transaction can proceed with commit after acquiring every token for directories in its read and write sets Tokens must be acquired in ascending order to avoid deadlocks; mechanisms are required to avoid starvation

3 Considered Implementations LL: lazy versioning, lazy conflict detection, committing transaction wins conflicts EL: lazy versioning, eager conflict detection, requester succeeds and others abort EE: eager versioning, eager conflict detection, requester stalls

4 Two conflicting transactions that keep aborting each other Can do exponential back-off to handle livelock Fixable by doing requester stalls? VM: any CD: eager CR: requester wins Pathology 1: Friendly Fire

5 A writer has to wait for the reader to finish – but if more readers keep showing up, the writer is starved (note that the directory allows new readers to proceed by just adding them to the list of sharers) VM: any CD: eager CR: requester stalls Pathology 2: Starving Writer

6 If there’s a single commit token, transaction commit is serialized There are ways to alleviate this problem VM: lazy CD: lazy CR: any Pathology 3: Serialized Commit

7 A transaction is stalling on another transaction that ultimately aborts and takes a while to reinstate old values VM: any CD: eager CR: requester stalls Pathology 4: Futile Stall

8 Small successful transactions can keep aborting a large transaction The large transaction can eventually grab the token and not release it until after it commits VM: lazy CD: lazy CR: committer wins Pathology 5: Starving Elder

9 A number of similar (conflicting) transactions execute together – one wins, the others all abort – shortly, these transactions all return and repeat the process VM: lazy CD: lazy CR: committer wins Pathology 6: Restart Convoy

10 If two transactions both read the same object and then both decide to write it, a deadlock is created Exacerbated by the Futile Stall pathology Solution? VM: eager CD: eager CR: requester stalls Pathology 7: Dueling Upgrades

11 Four Extensions Predictor: predict if the read will soon be followed by a write and acquire write permissions aggressively Hybrid: if a transaction believes it is a Starving Writer, it can force other readers to abort; for everything else, use requester stalls Timestamp: In the EL case, requester wins only if it is the older transaction (handles Friendly Fire pathology) Backoff: in the LL case, aborting transactions invoke exponential back-off to prevent convoy formation

12 Title Bullet