event signal mechanism

event signal mechanism

Post by spramod_i » Tue, 20 Jul 2004 19:28:10

When some event is signalled its event value is modified by sig incr.
Suppose signal option is to wake up first waiting process ,the first
process within the range will get activated and wait incr is added.
At the same instant there could be multiple processes waiting within
the queue which satisfies range criteria with modified event value.
But they are not triggered immediately, and must wait for another
signal to happen.

Now if new wait request comes with the range requirement similar to
that of pending processes (for which range is satisfied), the new
process gets activated immediately. And it need not wait for signal to

Is behavior/understanding correct?


event signal mechanism

Post by ganeshokad » Sun, 01 Aug 2004 17:48:26

Yes, you are right. This kind of a situation can generally lead to
a deadlock or cause lack of synchronisation between processes bacause
the new process which executed "wait" on the event will cause the
event value to change by wait increment "without the knowledge of the
first process". Infact it is a bad design to allow two processes to
successfully acquire and event at the same time (ofcourse unless you
know what you are doing!).
Hope that helps.

Ganesh Okade
Sunlux Technologies Ltd.