The ‘Transfer’ transactions T and U are defined as:
T: a.withdraw(4); b.deposit(4);
U: c.withdraw(3); b.deposit(3);
Suppose that they are structured as pairs of nested transactions:
Explain why the use of these nested transactions generally permits a larger number of serially equivalent interleavings than non-nested ones.
Considering the non-nested case, a serial execution with T before U is:
/(2!*1!) = 3 serially equivalent interleavings.
We can get another 3 interleavings that are serially equivalent to an execution of U before T. They are different because they all contain U2; T2. The total is 6.
Now consider the nested transactions. The 4 transactions may be executed in any (serial) order, giving us 4! =
24 orders of execution.
Nested transactions allow more serially equivalent interleavings because: i) there is a larger number of serial executions, ii) there is more potential for overlap between transactions (iii) the scope of the effect of conflicting operations can be narrowed.
You might also like to view...
Check boxes are selected by default.
Answer the following statement true (T) or false (F)
Suppose int i = 5, which of the following can be used as an index for array double[] t = new double[100]?
a. i b. (int)(Math.random() * 100)) c. i + 10 d. i + 6.5 e. Math.random() * 100
?According to a report by security company Websense, more than half of the Web sites classified as malicious are actually legitimate Web sites that have been compromised.
Answer the following statement true (T) or false (F)
Hold down Ctrl + Enter to insert one of these:
A) Manual page break B) Manual line break C) Manual paragraph break