3.3k views

For the schedule given below, which of the following is correct:

$$\begin{array}{ll} \text{1} & \text{Read A} & \text{} \\ \text{2} & \text{} & \text{Read B} \\ \text{3} & \text{Write A} & \text{} \\ \text{4} & \text{} & \text{Read A} \\ \text{5} & \text{} & \text{Write A} \\ \text{6} & \text{} & \text{Write B} \\ \text{7} & \text{Read B} & \text{} \\ \text{8} & \text{Write B} & \text{} \\\end{array}$$

1. This schedule is serializable and can occur in a scheme using 2PL protocol

2. This schedule is serializable but cannot occur in a scheme using 2PL protocol

3. This schedule is not serializable but can occur in a scheme using 2PL protocol

4. This schedule is not serializable and cannot occur in a scheme using 2PL protocol

edited | 3.3k views
0
quating from namathe " 2pl guarantees serializability but it does not permit all serializable schedule"

If we draw the precedence graph we get a loop,and hence the schedule is not conflict serializable.

There is no blind write too so ,there is no chance that view serializability can occur.

Now 2pl ensures CS.

Since possiblity of CS is ruled out at the onset,so schedule cannot occur in 2PL.

Ans d)

0
What it means that it cannot occour in a scheme using 2PL protocol?? Plzzz explain.
0
If a schedule occur in 2PL protocol does it mean that...both the transaction should be completed.?

Because here only first transaction can be completed..second will be blocked at READ A.....
0
If a schedule occurs in 2PL successfully, it is conflict serializable I think.
0
For a schedule to be in 2PL, there should be growth and shrinking phase. Cann't I use this fact to say it is not possible using 2PL.?
0
growth and shrinking phase of ""             ""?
0
locks..
0
where are locks here?
0
That's what i want to say that there is no locks. So can i say directly it is not using 2-phase locking.
+3

if there is a lock then only we can talk about that concept else have to go with other methods to check...

+2

@thor
we have to put locks ourselves and then check if 2PL is possible or not.

0
Suppose if I get some new question regarding if schedule is 2PL or not? then do i have to put locks myself or analyse schedule on the basis of already present lock?
0
@thor see my updated solution
–1 vote
Option D

1
2