Which of the following is correct ? I. Two phase locking is an optimistic…

2014

Which of the following is correct ?

I. Two phase locking is an optimistic protocol.

II. Two phase locking is pessimistic protocol

III. Time stamping is an optimistic protocol.

IV. Time stamping is pessimistic protocol.

  1. A.

    I and III

  2. B.

    II and IV

  3. C.

    I and IV

  4. D.

    II and III

Attempted by 91 students.

Show answer & explanation

Correct answer: B

"Pessimistic" means the system assumes conflicts will happen and takes action early to prevent them.

  • Statement II: Two-Phase Locking is a pessimistic protocol.

    • It forces a transaction to acquire a lock before accessing data. If another transaction holds the lock, the current one must wait. This "lock-before-use" approach is the definition of pessimistic control.

  • Statement IV: Time stamping is a pessimistic protocol.

    • Even though it doesn't use locks, it is pessimistic because it decides the order of execution as soon as a transaction starts. If a transaction tries to access data in a way that violates its timestamp order, it is immediately aborted and restarted.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…