[Info-vax] counting-lock ?
H Vlems
hvlems at freenet.de
Thu Oct 22 17:41:07 EDT 2009
On Oct 22, 6:03 pm, Pierre <pierre.... at gmail.com> wrote:
> Hans, VAXman,
>
> I use the DLM because if the process owning a lock dies, the lock is
> automatically released.
> if I understand correctly what you say, a logical or a license would
> be used in the same way as a counting-semaphore: I increment the
> counter when entering the "critical path" and decrement it when
> leaving it but if the process dies (bug, stop/id, etc) the counter is
> never decremented :(
>
> Pierre.
Correct, externally stored resources won't work because you can't be
sure that an error condition leaves the counter mechanism intact.
Though a logical that exists only during the life of a process might
work. Like a logical defined with the /USER attribute only exists
until the next program ends.
More information about the Info-vax
mailing list