HP3000-L Archives

November 1998, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bruce Toback <[log in to unmask]>
Reply To:
Bruce Toback <[log in to unmask]>
Date:
Wed, 18 Nov 1998 16:54:35 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
Greg McDaniel writes:

>Could someone tell me if there are any problems with some programs doing
>conditional item level locks while other programs are doing
>unconditional item level locks.  The programs are all locking the same
>item.  All of our code currently use conditional item locks but we would
>like to move to unconditional locks for some applications.  Hence we
>would end up with a mixture of conditional/unconditional item locks.

The only problem with having a mix is that if one record is particularly
busy, the conditionally-locking applications may never be able to get a
lock. This will happen if there's always a queue for the resource -- that
is, if there are always at least two unconditional locks going on at one
time (the one with the resource and another waiting for it).

If there's no single resource that's very busy, the mix should work out
OK. This means that you're doing item-level locks, and your application
design doesn't include any "special purpose" key values that would be
high-contention resources. Make sure you're not doing any set-level
locks, or a mixture of item- and set-level locks, which effectively turns
an item-level lock into a set-level lock. Also, make sure that you're
using exactly one lockitem per set, because a process that's got one item
locked blocks any lock attempt on some other item (or on the set). This
also effectively turns item-level locks into set-level locks.

-- Bruce

PS. Is a timed lock or abortable lock anywhere on the SIGImage
enhancement list?

- B


--------------------------------------------------------------------------
Bruce Toback    Tel: (602) 996-8601| My candle burns at both ends;
OPT, Inc.            (800) 858-4507| It will not last the night;
11801 N. Tatum Blvd. Ste. 142      | But ah, my foes, and oh, my friends -
Phoenix AZ 85028                   | It gives a lovely light.
btoback AT optc.com                |     -- Edna St. Vincent Millay
Mail sent to [log in to unmask] will be inspected for a
fee of US$250. Mailing to said address constitutes agreement to
pay, including collection costs.

ATOM RSS1 RSS2