[Info-vax] K-mutex

Jan-Erik Soderholm jan-erik.soderholm at telia.com
Wed Dec 14 17:26:11 EST 2011


Pierre wrote 2011-12-14 23:18:
> On Dec 14, 7:43 pm, koeh... at eisner.nospam.encompasserve.org (Bob
> Koehler) wrote:
>
>>     Several months ago, I needed to emulate the POSIX semaphore routines.
>>
>>     Next time I saw release notes (8.4?), POSIX semaphore routines were
>>     supported.
>>
>>     But I don't have that release of VMS at home, and I assume I never will
>>     on my VAX.
>>
>>     I'll bet I can emaulate them on top of your mutex code, so thanks for
>>     posting actual technical content in c.o.v.
>
> as far as I understand POSIX semaphores, there is a major difference
> with K-mutex : with semaphores, a process mark a resources slot as
> been used but *any other* may free it. with K-mutex, only the process
> that marked the resource slot as been used may free it.
>
> the easiest way to emulate semaphores with the DLM is to use a lock
> with a value block. this method is not fault-tolerant but neither are
> semaphores (if a process crash before freeing the resource slot, this
> slot may be totally  lost).
>
> so, depending on what you want to do, one method or the other may fit
> your problem.
>
> BTW, what is c.o.v. ?

comp.os.vms.





More information about the Info-vax mailing list