chapter12 - Introduction Transactions Nested transactions...

Info iconThis preview shows pages 1–11. 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

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: Introduction Transactions Nested transactions Locks Optimistic concurrency control Timestamp ordering Comparison of methods for concurrency control Summary Chapter 12: Transactions and Concurrency Control The goal of transactions All objects remain in a consistent state when they are accessed by multiple transactions and in the presence of server crashes Concurrency control Enhance reliability Recovery from failures Record in permanent storage The banking example Introduction Multi-threaded banking server Atomic operations Operations that are free from interference from concurrent operations being performed in other threads Only one thread can access an account at a time Public synchronized void deposit(int amount) {} Synchronization of server operations Mutual exclusion Synchronized Producer/Consumer E.g., wait and notify in Java Simple synchronization (without transaction) Writes to permanent storage may fail Write nothing or wrong value file storage may decay reading bad data can be detect (by checksum) Servers may crash occasionally Memory recover to the last updated state continue recovery using information in permanent storage no arbitrary failure An arbitrary delay of a message A message may be lost, duplicated or corrupted The recipient can detect corrupted messages Failure model for transactions [lamport1981] Introduction Transactions Nested transactions Locks Optimistic concurrency control Timestamp ordering Comparison of methods for concurrency control Summary Chapter 12: Transactions and Concurrency Control What is a transaction? A sequence of separate operations that execute in a atomic manner Free from interference by operations that belong to different transaction Nothing-or-all semantics of the transaction An example All or nothing Failure atomicity durability Isolation Transactions Atomicity A transaction must be all or nothing Consistency A transaction takes the system from one consistent state to another consistent state The state during a transaction is invisible to another Isolation Serially equivalent or serializable Durability ACID properties Transaction coordinator Each transaction is created and managed by a coordinator Result of a transaction Success Aborted Initiated by client Initiated by server Example Use a transaction The lost update problem The final balance of b should be $242 rather than $220 Inconsistent retrievals The total should be $400 rather than $300 Concurrency control What is serial equivalence?...
View Full Document

This note was uploaded on 06/12/2011 for the course CS 551 taught by Professor Staff during the Summer '08 term at Colorado State.

Page1 / 89

chapter12 - Introduction Transactions Nested transactions...

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

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