The transactions T, U and V use strict two-phase locking and their requests are interleaved as follows:
Assuming that the recovery manager appends the data entry corresponding to each Write operation to the log file immediately instead of waiting until the end of the transaction, describe the information written to the log file on behalf of the transactions T, U and V. Does early writing affect the correctness of the recovery procedure? What are the advantages and disadvantages of early writing?
As T acquires a read lock on ai, U’s Write(i,55) waits until T has committed and released the lock:
We have shown a possible interleaving of V’s Write(k,88) and prepared entries between T’s prepared and commit entries. Early writing does not affect the correctness of the recovery procedure because the commit entries reflect the order in which transactions were committed.
Disadvantages of early writing: a transaction may abort after entries have been written, due to deadlock. Also there can be duplicate entries (like k=77 and k=88) if the same data item is written twice by the same transaction.
Advantages of early writing: commitment of transactions is faster.
You might also like to view...
Which is equivalent to if (!(grade == sentinelValue))?
a) if (grade !== sentinelValue) b)if (grade != sentinelValue) c) if (grade == sentinelValue) d) if (grade !== sentinelValue)
What must be done to a Windows Server before it can assign IPv6 addresses via DHCPv6?
What will be an ideal response?