in Databases
7,461 views
5 votes
5 votes

Which of the following is correct with respect to Two phase commit protocol?

  1. Ensures serializability
  2. Prevents Deadlock
  3. Detects Deadlock
  4. Recover from Deadlock
in Databases
7.5k views

3 Answers

7 votes
7 votes
Best answer

2 Phase commit protocol ensures serializability.

selected by

3 Comments

Two-phase commit (2PC) protocol should not be confused with the two-phase locking (2PL) protocol, a concurrency control protocol.

3
3
two phase protocol(growing and shrinking) is not free from deadlock that's why we use tree based or graph based protocol. It ensures the serializability by maintaining the order of lock point(last point where transaction acquire the lock in a given schedule)

so ans should be (A)
2
2

What do I think! I think no one option is correct. If there would this question about 2PL then answer would be A but here question is about 2PC. So, no option is looking perfect answer.

2PC is a distributed algorithm that coordinates all the processes that participate in a distributed atomic transaction. However in process of 2PC, deadlock occurs sometimes then this protocol have ability to recover from deadlock but this recovering of deadlock is not in general context.

Reference: https://en.wikipedia.org/wiki/Two-phase_commit_protocol

2
2
3 votes
3 votes

 

(A) IS CORRECT.

1 comment

It's 2 phase commit protocol not 2PL
0
0
2 votes
2 votes
NO 2PC SO IS THERE SO IT MUST BE 2PL SO APPROPIATE ANSWER  OPTION  A IS CORRECT
by