Xref: utzoo comp.unix.internals:2140 comp.unix.wizards:24228 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!wuarchive!cs.utexas.edu!romp!auschs!awdprime!greenber.austin.ibm.com!jfh From: jfh@greenber.austin.ibm.com (John F Haugh II) Newsgroups: comp.unix.internals,comp.unix.wizards Subject: Re: Help with 4.3 mod to kill uninteruptable procs. Message-ID: <5558@awdprime.UUCP> Date: 22 Feb 91 20:53:42 GMT References: <1991Feb19.001941.29928@lynx.CS.ORST.EDU> <1991Feb21.152845.29019@cbnews.att.com> Sender: news@awdprime.UUCP Followup-To: comp.unix.internals Organization: Obfuscated Features "R" Us, LCC Austin Lines: 31 In article <1991Feb21.152845.29019@cbnews.att.com> rock@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) Brought to you by Super Global Mega Corp .com