Correct option is A
Shared Lock (S-lock): Allows multiple transactions to read the resource at the same time, as it does not involve data modification.
·
Exclusive Lock (X-lock): Prohibits other transactions from acquiring either an S-lock or another X-lock until it is released.
From the table:
·
T1, T2, and T4 are read operations using S-locks, and they can share the resource simultaneously.
· However,
T3, holding an X-lock for writing, blocks all other operations until it releases the lock.
Important Key Points:
1. S-locks are
non-conflicting, allowing multiple transactions to read data simultaneously.
2. X-locks ensure
data integrity by blocking all other operations (reads or writes).
3. Transactions with X-locks must wait for any existing S-locks to be released before acquiring the lock.
Knowledge Booster:
·
Option (b): Incorrect, as X-locks cannot be acquired if S-locks already exist.
·
Option (c): Incorrect, as T4 cannot proceed while T3 holds an X-lock.
·
Option (d): Incorrect, as S-lock and X-lock cannot coexist on the same resource.
·
Option (e): Incorrect, as shared and exclusive locks have distinct purposes and are not interchangeable.