Give an example of a schedule in which a pessimistic concurrency control makes a transaction wait but later allows it to commit, while an optimistic concurrency control restarts the transaction.
What will be an ideal response?
r2(y) w1(x) r2(x) commit1 request to commit2
A pessimistic control would force T2 to w ait w hen it requested to read x but would
then allowthe operation after T1 commits and subsequently allow T2 to commit. An
optimistic control would abort T2 when it requested to commit.
Computer Science & Information Technology