arrow
arrow
arrow
Assume all transactions are attempting to access the same database resource. Transaction Operation Requested Lock Type Requested T1
Question

Assume all transactions are attempting to access the same database resource.

Transaction

Operation Requested

Lock Type Requested

T1

Read

Shared (S-lock)

T2

Read

Shared (S-lock)

T3

Write

Exclusive (X-lock)

T4

Read

Shared (S-lock)

Based on standard DBMS lock compatibility rules, which of the following statements is correct?

A.

Transactions T1, T2, and T4 can simultaneously hold S-locks on the same resource.

B.

Transaction T3 can obtain an X-lock while T1 holds an S-lock.

C.

Transaction T4 can read the resource while T3 holds an X-lock.

D.

An S-lock and an X-lock are compatible on the same resource.

E.

Shared and exclusive locks are interchangeable.

Correct option is A

In a DBMS locking mechanism, multiple transactions can simultaneously hold Shared Locks (S-locks) on the same resource because shared locks are compatible with each other and allow concurrent read operations.

However, an Exclusive Lock (X-lock) is incompatible with both shared and other exclusive locks because it is used for write operations and requires exclusive access to the resource.

Therefore:

  • T1, T2, and T4 can all read the resource together using S-locks.
  • T3 cannot obtain an X-lock while any S-lock exists on the resource.

Hence, option (a) is correct.

Important Key Points:

  1. Shared Locks (S-locks) allow multiple transactions to read the same resource simultaneously.
  2. Exclusive Locks (X-locks) are used for write operations.
  3. An X-lock is incompatible with both S-locks and other X-locks.
  4. Lock compatibility helps maintain data consistency and concurrency control in DBMS.

Knowledge Booster:

  1. (b) Transaction T3 can obtain an X-lock while T1 holds an S-lock: Incorrect because an X-lock is incompatible with an existing S-lock.
  2. (c) Transaction T4 can read the resource while T3 holds an X-lock: Incorrect because no shared access is allowed while an X-lock exists.
  3. (d) An S-lock and an X-lock are compatible on the same resource: Incorrect because S-locks and X-locks are incompatible.
  4. (e) Shared and exclusive locks are interchangeable: Incorrect because S-locks and X-locks serve different purposes and have different compatibility rules.

Free Tests

Free
Must Attempt

SBI Clerk Prelims Full Mock Test-01

languageIcon English
  • pdpQsnIcon100 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt

SBI Clerk Prelims 2026 : Reasoning Section Test 01

languageIcon English
  • pdpQsnIcon35 Questions
  • pdpsheetsIcon35 Marks
  • timerIcon20 Mins
languageIcon English
Free
Must Attempt

SBI Clerk Prelims 2026 : Quantitative Aptitude Section Test 01

languageIcon English
  • pdpQsnIcon35 Questions
  • pdpsheetsIcon35 Marks
  • timerIcon20 Mins
languageIcon English
test-prime-package

Access ‘IBPS SO IT Officer’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
446k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow