Question
Easy

Let transaction T1 has obtained a shared-mode lock S on data item Q and transaction T2 has obtained an exclusive-mode lock X on data item R. Consider the following statements: I: T1 can read Q but cannot write Q. II: T2 can read R but cannot write R. Which of the above statement(s) is/are valid ?

1
Only I
2
Only II
3
Both I and II
4
Neither I nor II
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter: Data Structures (Through C++)
Topic: Data Structure Concepts
Correct Answer
Option A
Explanation

The correct option is (1): In database concurrency control, the locking protocol dictates the operations a transaction can perform on a locked data item. A Shared-mode lock (S) is primarily used for read-only operations. When Transaction T1 obtains an S lock on data item Q, it signifies T1's intent to read Q, and it is permitted to do so. Crucially, an S lock is established specifically to prevent modification, ensuring…Read More