home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 26 Fixes1x / 26-Fixes1x.zip / 1301read.zip / README.DB < prev    next >
Text File  |  1991-04-03  |  1KB  |  24 lines

  1.  
  2.     U-locking
  3.  
  4.     DBM is enhanced to use U-locking to prevent certain types of deadlock.
  5.     During record locking, deadlocks can occur when two transactions lock a
  6.     record shared and both then try to convert their shared locks to
  7.     exclusive locks.  Neither transaction will be allowed to do this
  8.     conversion, since the other transaction already holds a shared lock on
  9.     the record.  Then one of the transactions will be rolled back to
  10.     resolve the deadlock.  This problem is sometimes called a conversion
  11.     deadlock.
  12.  
  13.     The enhancement is to use a new type of lock, update (or U-lock)
  14.     instead of a shared lock, in those cases where it is expected that the
  15.     lock may be upgraded to exclusive.  Update locks are compatible with
  16.     shared locks, but incompatible with update locks held by other
  17.     transactions.  The first transaction to request an update lock on a
  18.     record will get the lock.  The second transaction asking for an update
  19.     lock will have to wait until the first transaction releases its update
  20.     lock.  This allows the first transaction to go ahead with its upgrade
  21.     to exclusive and eventually commit, releasing the lock.  Then the
  22.     second transaction's request for an update lock will be granted.
  23.  
  24.