D option
If(write Time Stamp(Q)>=TS(Ti)) this condition true, it means write operations updated by later transaction of Ti. So Q is of no use, the read operation is rejected and Ti will be rolled back.
T1 |
T2 |
|
initially
RTS =0
WTS =0
|
R(Q) |
|
|
|
W(Q) |
|
|
R(Q) |
|
|
|
While Ti makes the request for read then condition to be checked
If(WTS(Q) >= TS(Ti)) if true then
Reject the read and Rollback of Ti
else
{
Read(Q)
if(RTS(Q)<TS(Ti)) then
RTS(Q)= TS(Ti)
}
1.Now checking been starts ,T1 issues a Read request
Initially WTS=0, RTS=0
then condition become false, then the Read request granted and the RTS value be updated with Transaction value.
WTS=0, RTS=1
2. Now T2 issues a write request then again condition been checked , For this the different condition is mentioned below
if(RTS(Q)>=TS(Ti) OR WTS(Q)>=TS(Ti)) then
The write operation Rejected and Roll back of T1
else
{
Write(Q)
WTS(Q)=TS(Ti)
}
the condition terminated as false, So WTS(Q) be updated by the value of TS(T2)
Now RTS=1, WTS=2.
3. T1 again issues a Read request , check the condition above mentioned for Read request by any transaction.
So this time condition become true , The request will be rejected and roll back the transaction.
And this schedule is not conflict Serializable too.