OOFS

Arthur A. Gleckler arthur@martigny.ai.mit.edu
Mon, 5 May 1997 08:52:37 -0700


Kelly Murray writes:
|  
|  > Object level locking is also very fast and efficient. It is also
|  
|  Please explain how, in a way that requires no source code change
|  (i.e. look at all your source code for which objects are used]

One method that I've always thought would be workable is to register
locks at the object level but communicate them initially at the page
level (or at a higher granularity).  When a second transaction tries
to lock an object on the same page, the two processes (actually, the
database code they're using) communicate to determine whether they're
attempting to lock the same object or just the same page.  That way,
you pay the communication costs of object-level locking only when
contention is already occurring.  An especially nice system would let
you set the initial locking granularity as high as you want (i.e. to
some multiple of one page).