Transaction
Transaction
Transaction
SYSTEMS
Semester – 5
Unit – 5
TRANSACTIONS
Example:
T1 and T2 are two different transactions. A pair of actions
of Read(R) and Write(W) operations between two different
transactions. Conflict pairs are below.
1. Read Write (RW)
2. Write Read (WR)
3. Write Write (WW)
CONFLICT SERIALIZABLE
CONFLICT SERIALIZABLE
T1 T2 T3
a=100
read(a)
a=a-40
write(a) //60
a=a-40
write(a) //20
a=a-20
write(a) //0
VIEW-SERIALIZABLE
T1 T2 T3
a=100
read(a)
a=a-40
write(a) //60
a=a-40
write(a) //20
a=a-20
write(a) //0
Now, the precedence graph of the table does not contain any
cycle/loop, which means it is conflict serializable (equivalent to serial
schedule, consistent), and the final result is the same as the first table.
NON-SERIALIZABLE SCHEDULE