Consider the following two phase locking protocol. Suppose a transaction $\text{T}$ accesses (for read or write operations), a certain set of objects $\{\text{O1},\ldots, \text{Ok} \}$. This is done in the following manner:
- $\text{Step 1}. \text{T}$ acquires exclusive locks to $\text{O1},\ldots, \text{Ok}$ in increasing order of their addresses.
- $\text{Step 2}$. The required operations are performed.
- $\text{Step 3}$. All locks are released
This protocol will
- guarantee serializability and deadlock-freedom
- guarantee neither serializability nor deadlock-freedom
- guarantee serializability but not deadlock-freedom
- guarantee deadlock-freedom but not serializability.