Please enable JavaScript.
Coggle requires JavaScript to display documents.
Isolation Concepts (Actions in transactions (Well-formed transactions, Two…
Isolation Concepts
Consistency as invariants (6)
How to achieve isolation
Sequentially processing
Concurrently processing
Goals
Concurrent execution should not cause applications to malfunction
Concurrent execution should not have lower throughput or bad response times than serial execution
Use dependency graphs
Any object modified in a transaction should not interfere with anything else
Cannot do in large scale
Dynamic in nature
Violation of isolation
Lost update (write-write conflict)
Dirty read (write-read conflict)
Non repeatable read (read-write conflict)
Changing between modes of locks
Shared request (SLOCK) from a current mode of Free, Shared or Exclusive
Exclusive request (XLOCK) from a current mode of Free, Shared or Exclusive
Actions in transactions
Well-formed transactions
Two phase transactions
Replacing Commit, Rollback
Add SLOCK to Read, XLOCK to Write
Dependencies
Equivalent history
Isolated history
Theorems
Wormhole
Locking theorem
Locking theorem (converse)
Rollback Theorem
Degrees of Isolation
Degree 3
Degree 2
Degree 1
Degree 0
Phantoms + Predicate Locks
Phantom locks: reading all objects doesn't stop creation of a new object
Ways to prevent
Predicate locks
Problems
How it works
Page locks
High volume TP systems use:
Key range locks
Hole locks
Granularity locks
The ideas
Compatibility matrix
Deadlocks
Convoy phenomenon
How it happens
Solutions
Optimistic locking
How it works
Snapshot isolation
Time stamping