Hi,
Its against HomeworkLib policy to ask multiple questions in one, please
post others as separate questions
Question 1:
Given transactions are
T1:A+B->A; A+B->B
T2:A+B->B;A+B->A
T3:B+1->A;A+1->B
a) read and write transactions.
To perform any computation on any variable, we need to read it
first
so in T1, the read writes would be as follows
read A
read B
write A+B to B
read A
read B
write A+B to A
for T2:
read A
read B
write A+B to A
read A
read B
write A+B to B
for T3:
read B
write B+1 to A
read A
write A+1 to B
b) undo/redo log are written when a write happens so that the
system can be recovered when a crash happens
therefore
in T1: we have the following reads and writes as shown above
read A
read B
write A+B to B - this is added as <T1,B, 10,15> in the format
<transactionId, element, before value, after value>
read A
read B
write A+B to A - this is added as <T1,A, 5,20> in the format
<transactionId, element, before value, after value>
for T2:
read A
read B
write A+B to A- this is added as <T1,A, 5,15> in the format
<transactionId, element, before value, after value>
read A
read B
write A+B to B- this is added as <T1,B, 10,25> in the format
<transactionId, element, before value, after value>
for T3:
read B
write B+1 to A - this is added as <T1,A, 5,11> in the format
<transactionId, element, before value, after value>
read A
write A+1 to B - this is added as <T1,B, 10,12> in the format
<transactionId, element, before value, after value>
Thumbs up if this was helpful, otherwise let me know in
comments
Question 1: Assume that initially A-5 and B:10. The following are 3 transactions on A and...
Student #2 C- 72% 144 34 0 40 70 Student #3 74% C 148 40 10 43 55 Student # 4 50 36 A 93% 186 10 90 Student #5 B+ 87% 174 48 10 46 70 Student #6 56% 112 44 5 28 35 Student #7 65 84% 168 50 10 43 Student #8 48 B- 80% 159 46 10 55 Student #9 C+ 79% 158 50 10 73 25 Student #10 86% 172 33 5 44 90 Student...
Case: Enron: Questionable Accounting Leads to CollapseIntroductionOnce upon a time, there was a gleaming office tower in Houston, Texas. In front of that gleaming tower was a giant “E,” slowly revolving, flashing in the hot Texas sun. But in 2001, the Enron Corporation, which once ranked among the top Fortune 500 companies, would collapse under a mountain of debt that had been concealed through a complex scheme of off-balance-sheet partnerships. Forced to declare bankruptcy, the energy firm laid off 4,000...
CASE 20 Enron: Not Accounting for the Future* INTRODUCTION Once upon a time, there was a gleaming office tower in Houston, Texas. In front of that gleaming tower was a giant "E" slowly revolving, flashing in the hot Texas sun. But in 2001, the Enron Corporation, which once ranked among the top Fortune 500 companies, would collapse under a mountain of debt that had been concealed through a complex scheme of off-balance-sheet partnerships. Forced to declare bankruptcy, the energy firm...