The Gateway to Computer Science Excellence
+5 votes
2k views

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 by Veteran (105k points) | 2k views

3 Answers

+6 votes
Best answer

2 Phase commit protocol ensures serializability.

by Boss (38.4k points)
selected by
+3

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

+2
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

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 votes
NO 2PC SO IS THERE SO IT MUST BE 2PL SO APPROPIATE ANSWER  OPTION  A IS CORRECT
by Junior (593 points)
+2 votes

 

(A) IS CORRECT.

by (233 points)
0
It's 2 phase commit protocol not 2PL
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,508 answers
195,530 comments
100,969 users