P/V using SysV semop(2)
Christoph Kuenkel
ckl at uwbln.UUCP
Wed Aug 24 23:45:43 AEST 1988
I just tried to implement Disjkstra's P/V semaphore operations using
system V's semops. what i found on three different SysV R.2 ports was
that mutual exclusion was ok but the order of entrance into the critical
section enclosed into P/V was ``by random'' (probably by order of kernel
process slot, which is roughly equivalent to ``by random'').
I implemented it using an array of 1 semaphore and a value of -1 for
sem_op.
As far as i understand, the documentations does not specify anything at all.
i cant believe it. is it impossible to implement P/V without starvation?
--
Christoph Kuenkel/UniWare GmbH Kantstr. 152, 1000 Berlin 12, West Germany
ck at tub.BITNET ckl at uwbln {unido,tmpmbx,tub}!uwbln!ckl
More information about the Comp.unix.wizards
mailing list