The operation create inserts a new bank account at a branch. The transactions T and U are defined as follows:

T: aBranch.create("Z");

U: z.deposit(10); z.deposit(20).



Assume that Z does not yet exist. Assume also that the deposit operation does nothing if the account given as argument does not exist. Consider the following interleaving of transactions T and U:



State the balance of Z after their execution in this order. Are these consistent with serially equivalent executions of T and U?


In the example, Z’s balance is $20 at the end. Serial executions of T and U are:
T then U: aBranch.create(“Z”); z.deposit(10);z.deposit(20). Z’s final balance is $30.
U then T: z.deposit(10); z.deposit(20); aBranch.create(“Z”). Z’s final balance is $0. Therefore the example is not a serially equivalent execution of T and U.

Computer Science & Information Technology

You might also like to view...

____ text is text that a user cannot select for copying, and text that cannot be edited.

a. Selectable b. Static c. Read-only d. Fixed

Computer Science & Information Technology

An image can have a realistic shadow effect if all shadows are ________

A) the same width B) on the same side of the image C) the same color D) set to glow

Computer Science & Information Technology

Which of the following is NOT a desktop operating system?

A. Windows B. Google Android C. OS X D. Chrome OS

Computer Science & Information Technology

What component supplies power to the motherboard?

A. PUS B. UPS C. USP D. PSU

Computer Science & Information Technology