[Info-vax] counting-lock ?
David Jones
JONESD at ecr6.ohio-state.edu
Mon Oct 26 09:35:22 EDT 2009
In message <8eac02f9-697f-4036-b91a-5cad24f7c5fe at h2g2000vbd.googlegroups.com>
Pierre <pierre.bru at gmail.com> writes:
>this looks interesting but if the process holding lock B dies before
>converting it to CW, the process waiting for B may wrongly exit on the
>timeout (or wait forever if no timeout is used). the same may happen
>if (unfortunately) a process holding a lock on B exits between
>counting and the conversion of lock on B to PW.
First of all, a process dieing while holding a lock should be a rare exception
and the cause investigated and fixed. You don't get a wait condition until
multiple (e.g. 5) processes hold the lock, If a lock holder dies, the wait
will still be satisfied by the next process that releases the lock. If someone
kills the process prior to converting lock B to PW, lock A goes also so the
next process needing the lock isn't blocked from seeing the correct current
grant count.
-----------------------------------------------------------------------------
David L. Jones | Phone: (614) 271-6718
Ohio State University | Internet:
140 W. 19th St. | jonesd at ecr6.ohio-state.edu
Columbus, OH 43210 | vman+ at osu.edu
Disclaimer: I'm looking for marbles all day long.
More information about the Info-vax
mailing list