Shared locks can coexist, while exclusive locks conflict with another holder.

highlighted = computed this step

Shared and exclusive locks

A shared lock can coexist with another shared lock on the same item. An exclusive lock conflicts with another holder. Note: the lock table is recomputed from the requested operations.

S compatible with S\text{S compatible with S}

Shared locks can coexist

The shared-lock example has 2 holders and 0 wait-for edges. Note: shared holders are shown in the rendered lock table.

holders=2,edges=0\text{holders}=2,\quad \text{edges}=0

2PL and MVCC are exact protocol traces on tiny schedules; real lock managers, deadlock avoidance/timeouts, version garbage-collection, and isolation-level tuning are beyond these traces - no product claims.

Shared locksitemmodeholderswaitersAST1,T2- deadlock: noT1T2

Exclusive request waits

The exclusive request example recomputes 1 wait-for edge. Note: the waiter appears in the lock table and graph.

edges=1\text{edges}=1

2PL and MVCC are exact protocol traces on tiny schedules; real lock managers, deadlock avoidance/timeouts, version garbage-collection, and isolation-level tuning are beyond these traces - no product claims.

Exclusive conflictitemmodeholderswaitersAST1T2:X deadlock: noT1T2

Summary

Lock compatibility decides whether a request is granted or waits. Note: 2PL and MVCC are exact protocol traces here; real lock managers, timeouts, garbage collection, and isolation tuning are beyond these traces.

lock compatibility\text{lock compatibility}