Help with 4.3 mod to kill uninteruptable procs.

John F Haugh II jfh at greenber.austin.ibm.com
Sat Feb 23 07:53:42 AEST 1991


In article <1991Feb21.152845.29019 at cbnews.att.com> rock at cbnews.att.com (Y. Rock Lee) writes:
>Yes, the process will think it has the resource it was sleeping on.
>But, it will be killed and release the resource during its exit
>before it has a chance to "think". This part looks OK to me.
>My only concern is that the driver of the particular device which
>the process is waiting for may react crazily when it is misinformed
>(a good driver should guard against this).

This just isn't true.

A typical sleep loop looks something like

	while (some_status & some_busy_flag)
		sleep (&some_status, PRI_O_MINE);

	some_status |= some_busy_flag;

If your only concern is getting this process to ignore the setting
of "some_busy_flag", you might be doing the right thing - but
remember - "some_status" still has the "some_busy_flag" set.  Killing
the process will not get that bit clear and if that bit being set
is what is hanging the process, the next process to enter that loop
is also going to hang.

What is needed is an exception routine that understands =exactly=
what to do to reset the resource to some well-defined state for any
possible state the resource may be in.
-- 
John F. Haugh II      |      I've Been Moved     |    MaBellNet: (512) 838-4340
SneakerNet: 809/1D064 |          AGAIN !         |      VNET: LCCB386 at AUSVMQ
BangNet: ..!cs.utexas.edu!ibmchs!auschs!snowball.austin.ibm.com!jfh (e-i-e-i-o)



More information about the Comp.unix.wizards mailing list