home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!vtserf!vttcf.cc.vt.edu!valdis
- From: valdis@vttcf.cc.vt.edu (Valdis Kletnieks)
- Newsgroups: comp.unix.wizards
- Subject: Re: Process 'purge' revisited.. Unix missing this?
- Message-ID: <9348@vtserf.cc.vt.edu>
- Date: 10 Nov 92 09:52:55 GMT
- References: <TPAQUETTE.92Nov6132758@gumby.ita.lgc.com>
- Sender: usenet@vtserf.cc.vt.edu
- Organization: Virginia Tech, Blacksburg, VA
- Lines: 42
-
- In article <TPAQUETTE.92Nov6132758@gumby.ita.lgc.com> tpaquette@ita.lgc.com (Trevor Paquette) writes:
- > All the responses I have recieved have all said exactly what I thought.
- >It is impossible to 'purge' a process witing on a hung device.
- >
- > Is this a deficency in Unix? Should it be added? Will I ever win the
- >lottery?
-
- No, it's a deficiency in operating systems in general.
-
- Now let's look at what happens:
-
- You have a "process"/"task"/whatever you want to call it that initiates
- an I/O transfer to a device. Said device mysteriously flames out
- before the transfer completes. You're sitting there with a process
- that has some buffers locked in memory as a target for the I/O.
-
- What should you do?
-
- You can't just kill the process and free the buffers - that device might
- wake up and complete the I/O over where the buffers USED to be.
- Unless you're willing to bet the system that you have managed to FOR SURE
- abort an in-progress transfer, you have to keep enough state around
- so that if it DOES complete, you won't get torched.
-
- SImply pretending the I/O is gone loses too - the process may get
- confused, and if the I/O *does* complete, you're torched.
-
- Killing the process and not freeing the buffers gets interesting, as
- you have to then find some way of dealing with the buffers - most
- operating systems kind of make an assumption that allocated real
- memory *belongs* to somebody - so a "kill the process and free all but
- these 960 bytes" gets interesting.
-
- And of course all sorts of OTHER warts arise in the real world.. ;)
-
- Feel free to propose what you think it should do - and remember in
- your design to address all the failure modes (Heck, we only *get*
- into this situation if something has failed already)....
-
- Valdis Kletnieks
- Computer Systems Engineer
- Virginia Tech
-