634 views
0 votes
0 votes

Which of the following is true?

  • In 2PL protocol if all exclusive lock are acquired by transactions in only increasing order of their addresses then 2PL protocol is deadlock free.
  • In 2PL protocol if all exclusive lock are acquire by transaction in only increasing order of their addresses then 2PL protocol is starvation free.
  • Both (a) and (b)
  • Neither (a) nor (b)

2 Answers

0 votes
0 votes
Option a is true , if you would see this option a has a same meaning in case of deadlock prevention strategy for circular wait , (IN circular wait you can request a request of higher number only ) Hence it is deadlock free

Option b is true ,  All deadlock free are starvtion free

but all starvation free are not deadlock free always

Hence both option are correct :D
0 votes
0 votes

option A

Deadlock: acquiring locks in the increasing order of addresses removes cyclic wait, hence, no deadlock.

Starvation: since there is no guarantee that a process will not get beaten by some other transaction to acquire a requested lock each time the lock gets released by the prior holder, starvation as a possibility can not be ruled out.

Related questions

0 votes
0 votes
1 answer
1
Mrityudoot asked Jan 12
128 views
Isn’t F$^{+}$ minimal cover? If C $\rightarrow$ A is already there, then why does augmented CD $\rightarrow$ A needs to be?
0 votes
0 votes
1 answer
2
1 votes
1 votes
1 answer
3
Sajal Mallick asked Nov 5, 2023
336 views
Unique not null is equivalent to primary key.Relational Algebra and SQL has same expressive power.Which of the above statements are False?
2 votes
2 votes
1 answer
4
kaustubh7 asked Sep 20, 2023
401 views
Consider a relation R having seven attributes ABCDEFG. Fields of R contain only atomic values.FDs = {CD → G, A → BC, B → CF, E → A, F → EG, G → D} is set of f...