In concurrency control, phantom problem may occur, when-
records are inserted
The phantom phenomenon arises when a transaction reads a set of tuples that satisfy a search condition and another concurrent transaction inserts a new tuple that also satisfies that condition.
Step 1 — T1 runs a predicate query, for example all accounts of one branch, and locks only the tuples that exist at that moment.
Step 2 — T2 inserts a new tuple for the same branch and commits; T1 holds no lock on this tuple because it did not exist.
Step 3 — T1 repeats the query and sees an extra “phantom” row, so the schedule is not serializable even though tuple-level two-phase locking was followed. Index locking or predicate locking is used to prevent this.
Modifying an existing record is a non-repeatable read or lost update, which tuple locks already prevent; indexing records does not change the data seen by a transaction. Deletions are covered by locks on the existing tuples, so the classic phantom case is the insertion of new records.
records are inserted option is correct.
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.
Match the following :
| List - I | List - II |
| a. Timeout ordering protocol | i. Wait for graph |
| b. Deadlock prevention | ii. Roll back |
| c. Deadlock detection | iii. Wait-die scheme |
| d. Deadlock recovery | iv. Thomas Write Rule |
Which of the following concurrency protocol ensures both conflict serializability and freedom from deadlock :
I. 2-phase locking
II. Time phase ordering
Which of the following concurrency protocol ensures both conflict serializability and freedom from deadlock ?
(a) 2 - phase Locking
(b) Time stamp - ordering
Match List I with List II
| List I | List II |
|---|---|
| A. Timestamp protocol | I. As long as the transaction is already running, it will try to obtain the required lock in the first part |
| B. Strict two-phase locking protocol | II. Indicates final lock of the schedule |
| C. Two-phase locking | III. Ensures freedom from deadlock |
| D. Lock point in two phase locking protocol | IV. Ensures cascade -less rollback |
Choose the correct answer from the options given below:
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.
Match the following :
| List - I | List - II |
| a. Timeout ordering protocol | i. Wait for graph |
| b. Deadlock prevention | ii. Roll back |
| c. Deadlock detection | iii. Wait-die scheme |
| d. Deadlock recovery | iv. Thomas Write Rule |
Which of the following concurrency protocol ensures both conflict serializability and freedom from deadlock :
I. 2-phase locking
II. Time phase ordering
Which of the following concurrency protocol ensures both conflict serializability and freedom from deadlock ?
(a) 2 - phase Locking
(b) Time stamp - ordering
Match List I with List II
| List I | List II |
|---|---|
| A. Timestamp protocol | I. As long as the transaction is already running, it will try to obtain the required lock in the first part |
| B. Strict two-phase locking protocol | II. Indicates final lock of the schedule |
| C. Two-phase locking | III. Ensures freedom from deadlock |
| D. Lock point in two phase locking protocol | IV. Ensures cascade -less rollback |
Choose the correct answer from the options given below: