Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucla-cs!ucla-seas!boole!plinio From: plinio@boole.seas.ucla.edu (Plinio Barbeito/;093091;allsites) Newsgroups: comp.os.misc Subject: Re: What constitutes a good OS? Message-ID: <1628@lee.SEAS.UCLA.EDU> Date: 15 Jan 91 04:11:04 GMT References: <1991Jan14.042520.18150@acc.stolaf.edu> <5233@auspex.auspex.com> Sender: news@SEAS.UCLA.EDU Organization: SEASnet, University of California, Los Angeles Lines: 53 In article <5233@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: >>Consider what would happened if the process table was kept in *the* >>(file system) name space. Then ls /proc to would report on which >>processies are running. [...] >>It also eliminates the need for a program to get rid of unwanted processies: >>just use the utility which removes files (rm). I agree with the (former) poster; I also see this as an elegant solution. You could get rid of a family of processes all at once by using wildcards! Simple example: kill all of the rpc deamons running by typing 'rm rpc.*d'. >Well, maybe. I don't think the Research "/proc" did that, and I seem to >remember that they didn't consider it the right way to go. I'm not sure >why, but *do* note that there isn't a UNIX program "to get rid of >unwanted processes" that I know of - there's a program to send an >*arbitrary* signal to a process or set of processes, but not one to >simply "get rid" of them (you can send SIGTERM with "kill", which lets >the process clean up before exiting, but isn't a guaranteed kill; you >can send some signal that causes a core dump, which may not let it clean >up but may give it a core dump, but that's not guaranteed either; you >can send a SIGKILL, which will kill anything not stuck in some >unbreakable wait). Any process that catches a signal, would effectively be modifying its file protection bits. To a 'process' file like this: pr-------- 2 user 512 Jan 11 13:53 process The user could do something like: chmod +w process to get: prw------- 2 user 512 Jan 11 13:53 process so that a subsequent rm would be able to remove the process. Other characters besides 'w' could be used for the different signals; this is just an example. The complexity is thus moved to the file protection bits, which is OK, IMO, because by looking at these you could tell beforehand whether or not you'd have to do the equivalent of a kill -9. Typically, I'll do a kill on a process to find out that it didn't go away, then have to do a kill -9 to get rid of it. plini b ----- Diclaimers: No Disclaimers