Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024

Transactions

Question 82
Which of the following statement is wrong ?
A
2 – phase locking protocol suffers from dead locks
B
Time – Stamp protocol suffers from more abort
C
Time stamp protocol suffers from cascading rollbacks where as 2 – phase locking protocol do not
D
None of these
Question 82 Explanation: 
Option (A) is correct because 2-Phase locking protocol provides a schedule which is conflict serializable but do not deadlock free schedule.
Option (B) is true because of timestamp ordering of the transactions, this protocol suffer more number of aborts.
Option (C) is true. Whenever some transaction T tries to issue a read_item(X) or a write_item(X) operation, the basic Time out algorithm compares the Timestamp of T with read_TS(X) and write_TS(X) to ensure that the timestamp order of transaction execution is not violated. If this order is violated, then transaction T is aborted and resubmitted to the system as a new transaction with a new timestamp.
If T is aborted and rolled back, any transaction T1 that may have used a value written by T must also be rolled back. Similarly, any transaction T2 that may have used a value written by T1 must
also be rolled back, and so on. This effect is known as cascading rollback.
But in case of 2-Phase locking, to avoid cascading aborts Strict two-phase locking is introduced in which a transaction holds an exclusive locks until the transaction commits/aborts. Rigorous
two-phase locking is even more stricter in which both Exclusive lock and shared lock are hold by the transaction until the transaction commits/abort.
Correct Answer: D
Question 82 Explanation: 
Option (A) is correct because 2-Phase locking protocol provides a schedule which is conflict serializable but do not deadlock free schedule.
Option (B) is true because of timestamp ordering of the transactions, this protocol suffer more number of aborts.
Option (C) is true. Whenever some transaction T tries to issue a read_item(X) or a write_item(X) operation, the basic Time out algorithm compares the Timestamp of T with read_TS(X) and write_TS(X) to ensure that the timestamp order of transaction execution is not violated. If this order is violated, then transaction T is aborted and resubmitted to the system as a new transaction with a new timestamp.
If T is aborted and rolled back, any transaction T1 that may have used a value written by T must also be rolled back. Similarly, any transaction T2 that may have used a value written by T1 must
also be rolled back, and so on. This effect is known as cascading rollback.
But in case of 2-Phase locking, to avoid cascading aborts Strict two-phase locking is introduced in which a transaction holds an exclusive locks until the transaction commits/aborts. Rigorous
two-phase locking is even more stricter in which both Exclusive lock and shared lock are hold by the transaction until the transaction commits/abort.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!