Shared Flashcard Set

Details

Comp2005 - Lecture 5 - Concurrency Control
Alejandro Saucedo - Comp2005 Lecture 5 FlashCard Set
16
Computer Science
Undergraduate 2
05/17/2013

Additional Computer Science Flashcards

 


 

Cards

Term
Give an example transaction where an update can be lost
Definition
[image]
Term
Give an example transaction where inconsistent retreivals are experienced
Definition
[image]
Term
How can lost updates and inconsistent retreival problems be solved in transactions?
Definition
Serially equivalent transactions
Term
What are the principles of serial equivalence?
Definition
  • All the operations in one transaction precede the operations in the other
  • Schedule produced by a concurrency control scheme should be equivalent to a serial schedule in which transactions are executed one after the other
  • For two transactions to be serially equivalent, it is necessary and sufficient that all pairs of conflicting operations be executed in the same order for all of the objects they both access
Term
What are some concurrent control approaches?
Definition
  • Locking
  • Optimistic concurrency control
  • Timestamp ordering
Term
Give an example of a recoverability problem
Definition
[image]
Term
What are some abort issues in transactions?
Definition
  • Dirty reads - requires recoverability of transactions in place
    • Transactions that have seen effects of a transaction that has consequently aborted must delay commit
  • Cascading aborts - a consequence of delay commits
    • Avoided by only allowing reads on objects that were written by committed transactions
  • Premature writes
Term
What are 'Dirty reads'?
Definition
When a value is read in a transaction that isn't yet committed, but that transaction is aborted, therefore the value read is invalid
Term
Give an exmaple diagram of nested transactions
Definition
[image]
Term
What are the principles of nested-transactions?
Definition
  • Root is top level transaction
  • non-root nodes are subtransactions
  • Subtransactions appear atomic to parent in respect with transaction failures and concurrent access
  • Transactions in the same level are serially equivalent
Term
What are the advantages of nested transactions?
Definition
  • Subtransactions at one level may run concurrently.
  • Subtransactions can commit or abort independently
Term
What are the rules for nested transactions?
Definition
  • A transaction may commit or abort only after their child transactions have completed
  • When a subtransaction completes it makes an independent decision either to commit provisionally or to abort
  • When parent aborts, all subtransactions are aborted
Term
Show a transaction with exclusive locks
Definition
[image]
Term
How does an exclusive lock operate?
Definition
  1. When an operation accesses an object within a transaction:
    • If the object is not already locked, it is locked and the operation proceeds
    • If the objet has a conflicting lock set by another transaction, the transmission must wait until it is unlocked
    • If the object has a non-conflicting lock set by another transaction, the lock is shared and the operation proceeds
    • If the object has already been locked in the same transaction, the lock will be promoted if necessary and the operation proceeds. (Where promotion is prevented by a conflicting lock, rule (b) is used)
  2. When a transaction is committed or aborted, the server unlocks all objects it locked for the transaction
Term
Show an example deadlock with write locks
Definition
[image]
Term
Show a resolution for deadlocks in write locks
Definition
[image]
Supporting users have an ad free experience!