Help with 4.3 mod to kill uninteruptable procs.

Pat Barron pat at orac.pgh.pa.us
Fri Feb 22 16:27:21 AEST 1991


In article <1991Feb21.152845.29019 at cbnews.att.com> rock at cbnews.att.com (Y. Rock Lee) writes:
>In article <1991Feb19.001941.29928 at lynx.CS.ORST.EDU> gatesl at mist.cs.orst.edu (Lee Gates) writes:
>>	Will the above method cause a race condition resulting from
>>the fact that the process probably assumes that the next time it runs 
>>it will have the resource it was sleeping on?  And if so, I would
>>appreciate some other suggestions as to how to solve this problem.
>
>Yes, the process will think it has the resource it was sleeping on.

Uhh, nope.  When a particular even occurs, *all* processes waiting on
that event are awakened.  By the time you run again, someone else may
have snarfed up the resource you were waiting for.

This has been the case forever (well, at least since V7) - when you come
out of a sleep(), you *must* check that the reason you were sleeping is
no longer true....

--Pat.



More information about the Comp.unix.wizards mailing list