CSEP 545 Transaction Processing for E-Commerce, Winter 2005                       University of Washington

2/17/05

 

Assignment 5

Preliminaries

a.        Read Chapter 9 (if you haven’t already).

b.       Read Chapter 6, Section 4 (the revised version on the course web).

 Problem 1

Why is it a bad idea to use a modified two-phase commit protocol that would ensure that if all participants voted Prepared during phase one then the decision must be to commit?

 Problem 2

Consider a system that uses the two-phase commit protocol with the cooperative termination protocol and no other optimizations. Assuming there are two participants, describe execution scenarios for each of the following:

i.                     All participants are blocked.

ii.                   The coordinator is blocked.

iii.                  Exactly one participant is blocked and it stays that way forever.

 Problem 3

Consider a database system that uses two-phase locking where locks are held until after a transaction commits. Consider the following scenario: The code of the transactions running on a particular system is changed, but the number of locks (all of which are write locks) required by a transaction is unaffected. The change results in an increase in response time but throughput (i.e. transactions per second) is the same before and after the change. Give three possible reasons.