home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 26 Fixes1x
/
26-Fixes1x.zip
/
1301read.zip
/
README.DB
< prev
next >
Wrap
Text File
|
1991-04-03
|
1KB
|
24 lines
U-locking
DBM is enhanced to use U-locking to prevent certain types of deadlock.
During record locking, deadlocks can occur when two transactions lock a
record shared and both then try to convert their shared locks to
exclusive locks. Neither transaction will be allowed to do this
conversion, since the other transaction already holds a shared lock on
the record. Then one of the transactions will be rolled back to
resolve the deadlock. This problem is sometimes called a conversion
deadlock.
The enhancement is to use a new type of lock, update (or U-lock)
instead of a shared lock, in those cases where it is expected that the
lock may be upgraded to exclusive. Update locks are compatible with
shared locks, but incompatible with update locks held by other
transactions. The first transaction to request an update lock on a
record will get the lock. The second transaction asking for an update
lock will have to wait until the first transaction releases its update
lock. This allows the first transaction to go ahead with its upgrade
to exclusive and eventually commit, releasing the lock. Then the
second transaction's request for an update lock will be granted.