Shared Flashcard Set

Details

Comp2005 - Lecture 4 - Transactions
Alejandro Saucedo - Comp2005 Lecture 4 FlashCard Set
14
Computer Networking
Undergraduate 2
05/17/2013

Additional Computer Networking Flashcards

 


 

Cards

Term
What are some challenges of accessing shared objects over distributed systems?
Definition
  • Heterogenity
  • Openness
  • Security
  • Scalability
  • Failure Handling
  • Concurrency
  • Transparency
  • Quality of Service
Term
What are the principles of transactions?
Definition
  • Atomic - either all are completed or neither are
  • Need to be able to 'roll back' to the initial state if transaction fails
  • Objects managed on server must remain in a consistent state when accessed by multpiple transactions and in presence of server crashes
Term
Give an example of an atomic method
Definition

public synchronized void deposit (int amount)  

       throws RemoteException {

...

}

Term
How does java atomic methods work?
Definition
  • They must have the tag 'synchronized'
  • If one thread invokes a synchronized method on an object the object is locked, and another thread invoking one of its synchronized methods is blocked until the lock is released
Term
What is stable storage?
Definition

Survives anything short of a disaster (e.g. mirrored disks)

 

Useful for applications requiring a high degree of fault tolerance

Term
What are the characteristics of a private workspace stable storage implementation?
Definition
  • Each current transaction has its own private workspace (Expensive, need to copy a lot)
  • File reads do not need a private copy
  • File writes only need to maintain a new index and modified blocks
  • abort: simply delete private workspace
  • commit: move private indices and shadow blocks to parent's workspace (atomically)
Term
What are the characteristics of a 'Write-Ahead logging' stable storage implementation?
Definition
  • Modify files in place (but first write record to a write-ahead log in stable storage giving full details)
  • If transaction succeeds and commits, write commit record to log
  • If it aborts, use log to roll back to previous state
Term
What does ACID consist for?
Definition
  • Atomicity
  • Consistency
  • Isolation
  • Durability
Term
What does Atomicity in ACID stand for?
Definition
A transaction either completes or it has no effect at all - even when server crashes
Term
What does Consistency in ACID stand for?
Definition

A transaction takes the system from one consistent state to another consistent state

 

(All values of respective variables must be the same - consistent)

Term
What does Isolation in ACID stand for?
Definition
Each transaction must be performed without interference from other transactions (intermediate effects are not visible to others)
Term
What does Durability in ACID stand for?
Definition
After a transaction has completed successfully, all its effects are saved in permanent storage
Term
What are the fundamentals of the Two-Phase commit?
Definition
  • Achieves atomic commits in distributed systems
  • Highly resilient even in the presence of multiple crashes
  • Once process acts as coordinator - the other processes as subordinates
Term
What does a two phase commit consist of?
Definition

[image]

 

  1. Coordinator Writes 'prepare' in log
  2. Coordinator sends 'prepare' message
  3. Subordinate(s) receives 'prepare message'
  4. Subordinate(s) write 'ready in log
  5. Subordinate(s) send 'ready message
  6. All replies are collected by Coordinator
  7. Coordinator writes 'Commit' in log
  8. Coordinator sends 'Commit' message
  9. Subordinate(s) receives 'Commit message'
  10. Subordinate(s) writes 'Commit' message in log
  11. Subordinate(s) commit
  12. Subordinate(s) send 'Finished' message
Supporting users have an ad free experience!