A server manages the objects a1, a2,... an. The server provides two operations for its clients:
Read (i) returns the value of
Write(i, Value) assigns Value to
The transactions T, U and V are defined as follows:
T: x= Read (i); Write(j, 44);
U: Write(i, 55);Write(j, 66);
V: Write(k, 77);Write(k, 88);
Describe the information written to the log file on behalf of these three transactions if strict two-phase locking is in use and U acquires ai and aj before T. Describe how the recovery manager would use this information to recover the effects of T, U and V when the server is replaced after a crash. What is the significance of the order
of the commit entries in the log file?
As transaction U acquires aj first, it commits first and the entries of transaction T follow those of U. For simplicity we show the entries of transaction V after those of transaction T.
On recovery, the recovery manager sets default values in the data items a1...an. It then starts at the end of the log file (at position P10). It sees V has committed, finds P9 and V's intentions list
The order of the commit entries in the log file reflect the order in which transactions committed. More recent transactions come after earlier ones. Recovery starts from the end, taking the effects of the most recent transactions first.
You might also like to view...
The ISP allows more than one person to edit a document in a document library
Indicate whether the statement is true or false
________ shows the report and the data; some report design such as field lengths and fonts can be changed in this view
A) Report view B) Print Preview C) Layout view D) Design view