In a recent note, Walt Farrell said:

> Date:         Tue, 1 Aug 2006 15:49:35 -0400
> 
> On 8/1/2006 10:10 AM, Edward Jaffe wrote:
> >
> > No. Holding a shared ENQ prevents others from acquiring an exclusive ENQ
> > on the same resource and modifying it. To maintain the integrity of the
> > resource, you use RET=CHNG to upgrade from shared to exclusive without
> > losing control. If you were required to DEQ and then re-ENQ to perform
> > the upgrade, you would lose control of the resource between the time you
> > inspected it and the time you had the necessary serialization to update
> > it. In the worst case scenario, someone else could change (or even
> > delete) the resource in-between!!
> 
> Of course, if anyone else also has the resource with a shared ENQ, your
> RET=CHNG will fail, and at that point you have no choice but to DEQ and
> try again from the beginning (presumably starting with EXC that time
> around).
> 
What do you gain by performing the DEQ?  The EXCL ENQ will immediately
fail and continue to fail until all other jobs DEQ the resource.
Isn't it as good or better simply to re-issue the RET=CHNG until
it works, or use the WAIT option if you have the authority.

But, yes, I was using rhetoric to make the same point Binyamin made
more explicitly: doing a DEQ; ENQ is subject to the same hazard
of interruption by other jobs whether one uses the sequence to
downgrade or upgrade an ENQ.  If it's unacceptable for upgrading,
it's likewise unacceptable for downgrading.

-- gil
-- 
StorageTek
INFORMATION made POWERFUL

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to