lect-13 - 2006, 2007, M. T. Harandi Lecture 13- 1 Computer...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2006, 2007, M. T. Harandi Lecture 13- 1 Computer Science 425 Distributed Systems Lecture 13 Concurrency Control - I 2006, 2007, M. T. Harandi Lecture 13- 2 Transaction Processing Systems Client Client Client Client Client Trans. Manager Object Manager Scheduler Trans. Manager Object Manager Scheduler Concurrency Control Transaction Workspace locking / unlocking req. Protocol management Subtrans Management Object Creation, lock recovery, destruction O b j e c t s O b j e c t s 2006, 2007, M. T. Harandi Lecture 13- 3 : Transaction operations can run concurrently, provided isolation principle is not violated (same as interleaving ops.) : Concurrent operations must be consistent: : If trans.T has executed a read operation on object A, a concurrent trans. U must not write to A until T commits or aborts. : If trans, T has executed a write operation on object A, a concurrent U must not read or write to A until T commits or aborts. : 3 approaches to deal with consistency: avoidance , prevention , validation Concurrent Transactions 2006, 2007, M. T. Harandi Lecture 13- 4 : Transaction managers set locks on objects they need. A concurrent trans. cannot access locked objects ( blocked ). : Two phase locking: : All pairs of conflicting operations of two transactions should be executed in the same order. To ensure this, a transaction is not allowed new locks, after it has released a lock. : In the first (growing) phase, new locks are acquired, and in the second (shrinking) phase, locks are released. : Strict two phase locking: : Locking is performed when the requests to read/write are about to be applied. : Unlocking is performed by the commit/abort operations of the transaction coordinator. : Use of separate read and write locks is more efficient than a single exclusive lock. Conflict Prevention: Locking 2006, 2007, M. T. Harandi Lecture 13- 5 Exclusive Locks Transaction T1 Transaction T2 OpenTransaction() balance = b.getBalance() OpenTransaction() balance = b.getBalance() b.setBalance = (balance*1.1) a.withdraw(balance* 0.1)a....
View Full Document

This note was uploaded on 07/01/2009 for the course CS CS421 taught by Professor Kirillmechitov during the Summer '09 term at University of Illinois, Urbana Champaign.

Page1 / 17

lect-13 - 2006, 2007, M. T. Harandi Lecture 13- 1 Computer...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online