Chris Bitmead uid(x22068) Chris.Bitmead@Alcatel.com.au
Tue, 06 May 1997 11:01:00 +1000

>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).

This can be a good system, except that it gets a bit annoying in a
distributed system when you have to ask a process on another machine
to clarify something about its locks. If the network has an outage you
can be left waiting forever for a lock on an object that nobody else
was interested in in the first place. Or even if there is a
distributed system where one machine is on a slow net link, all
machines can be slowed down to the speed of the slowest link.