forked from shubhang-arora/two-phase-locking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutput3.txt
60 lines (56 loc) · 2.09 KB
/
output3.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/usr/local/bin/python2.7 "/Volumes/Macintosh HD/College/smeseters/Spring 14/DB II/Project01/TheCode/Assignment.py"
Begin Transaction 1
Read operation
Putting the data item Y under ReadLock by Transaction 1
write operation
Upgrading Readlock to WriteLock on data item Y for transaction 1
Read operation
Putting the data item Z under ReadLock by Transaction 1
Begin Transaction 2
Read operation
Putting the data item X under ReadLock by Transaction 2
write operation
Upgrading Readlock to WriteLock on data item X for transaction 2
write operation
Upgrading Readlock to WriteLock on data item Z for transaction 1
Read operation
Conflicting Write lock: data item Y is under ReadLock by Transaction 1
calling wound-wait mechanism
changing transaction state for transaction 2 to blocked
Begin Transaction 3
Read operation
Conflicting Write lock: data item Z is under ReadLock by Transaction 1
calling wound-wait mechanism
changing transaction state for transaction 3 to blocked
end
Committing transaction 1
Unlocking all resources held by transaction 1
checking if there are any transactions waiting on the freed resources
attempting operation r2 (Y);
Read operation
Putting the data item Y under ReadLock by Transaction 2
write operation
data item Z is under WriteLock by Transaction 2
write operation
Upgrading Readlock to WriteLock on data item Y for transaction 2
end
Committing transaction 2
Unlocking all resources held by transaction 2
checking if there are any transactions waiting on the freed resources
attempting operation r3 (Z);
Read operation
Conflicting Write lock: data item Z is under ReadLock by Transaction 3
calling wound-wait mechanism
changing transaction state for transaction 3 to blocked
Read operation
Putting the data item X under ReadLock by Transaction 3
write operation
Upgrading Readlock to WriteLock on data item X for transaction 3
end
Committing transaction 3
Unlocking all resources held by transaction 3
checking if there are any transactions waiting on the freed resources
attempting operation r3 (Z);
Read operation
Putting the data item Z under ReadLock by Transaction 3
Process finished with exit code 0