begin example transaction read x if x < 10 abort transaction x = x - 10 write x read y y = y + 10 write y end transactionPart B: Prove that all possible transactions can be rewritten to conform to the two-phase model. One acceptable proof is a general set of rewrite rules that can be applied to any code fragment in order to convert it into a two-phase model. An informal statement of such a rule set is sufficient.
Part C: The two-phase model is not important if all database updates are cached and only performed as the transaction is committed. Under what set of assumptions about the implementation of read and write, and under what set of assumptions about system failure is the two-phase model useful.
Part A: What security or reliability problems are introduced by allowing the client to assign the transaction ID, and which of these problems remain if the server assigns the ID.
Part B: In a multiple-server interaction, for example, where one client deals with multiple servers, or where a server deals with subsidiary servers, what party is the most logical choice for assigning the transaction ID?
Note! Your suggestion should be above the level of pseudocode, but it may involve suggesting a set of new functions to add to the thread package, and it may involve suggesting a set of new data structures to go with those functions.