Consider the real-world transaction for dispensing cash discussed in Section 19.3.5. For each of the critical times—before, during, and after the execution of the real- world transaction—in which the system might crash, describe how the system (after it recovers from the crash) determines whether or not the cash has been dispensed. Discuss some ways in which the cash-dispensing mechanism itself might fail in such a way that the system cannot tell whether or not the cash has been dispensed.

What will be an ideal response?


If the system crashes before the real-world transaction (on the queue) commits, and
before the cash is dispensed, the transaction is restarted and checks the value stored
in the database and in the physical counter. They will be the same and hence the
transaction is reexecuted and the cash dispensed.
If the system crashes before the real-world transaction (on the queue) commits,
and after the cash is dispensed, the transaction is restarted and checks the value stored
in the database and in the physical counter. They will be different, so the transaction
does not dispense the cash.
The protocol will not work correctly if the counter stops working or works
incorrectly.

Computer Science & Information Technology

You might also like to view...

The size of virtual storage is limited by the addressing scheme of the computer system and by the amount of __________ available.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

What would be the best implementation strategy for the database and app? Why?

What will be an ideal response?

Computer Science & Information Technology

Three common applications of heaps are selection algorithms, priority queues, and sorting.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The malicious code attack includes the execution of viruses, worms, Trojan horses, and active Web scripts with the intent to destroy or steal information. _________________________

Answer the following statement true (T) or false (F)

Computer Science & Information Technology