home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!contex!marvin.contex.com!frank
- From: frank@marvin.contex.com (Frank Perdicaro)
- Newsgroups: comp.sys.sgi
- Subject: Re: Killed?
- Message-ID: <3119@contex.contex.com>
- Date: 10 Nov 92 14:21:11 GMT
- References: <1992Nov4.163355.12112@odin.corp.sgi.com> <3112@contex.contex.com> <1992Nov7.222817.2014@sol.ctr.columbia.edu>
- Sender: news@contex.contex.com
- Organization: Xyvision Design Systems
- Lines: 51
-
- In article <1992Nov7.222817.2014@sol.ctr.columbia.edu> shenkin@still3.chem.columbia.edu (Peter Shenkin) writes:
- >In article <3112@contex.contex.com> frank@marvin.contex.com (Frank Perdicaro) writes:
- >....
- >>Process B eventaully dies, A finds old date, no evidence in SYSLOG,
- >>concludes B has died a natural death, and kills itself after it cleans
- >>up its semaphore and shared memeory.
- >
- >What does A do if B has been killed? What does B do if A has been killed?
-
- Lets back up a bit and realize that there are two scenarios I am
- thinking of. First, the kernel sends the pig process a signal it
- catch, the process is removed, and a message is put in SYSLOG. This
- is a special event, unlike most other signals a process gets; indeed
- this is why it is logged in SYSLOG. Second are all other deaths, be
- they by uncaught signals, or by normal termination, loss of power, or
- whatever.
-
- It is this first, special, event that one can track with the system I
- mentioned. Addressing the last concern first, the kernel kills the
- pig, B, -- thats why one must keep A small. You are right: without
- knowing what the algorithm is, there is no way to say that A will not
- be killed first. My setup makes an undetectable event highly likly to
- be detected. Highly likely is not good enough for some.
- Back to the first point, if B is killed ( not be the kernel in the
- special first case above ) it must be sent a signal, or expire
- naturally. If it expires naturally, the shm key or the semaphore
- could be set to an agreed upon value. Similar for a caught signal.
- An uncaught signal causes a kill thats not logged in SYSLOG.
-
- In general, this system can be refined ad infinitum to be a better and
- better tracking system. More and more checks can be put in.
- How much time do you want to spend, knowing that without the original
- algorithm, perfection is not possible?
-
- I think what you really want is another signal. Make A and B a
- process group. When B gets too big, send it a TERMINATE signal.
- Then send the procees group a signal MEMBER WAS TERMINATED, and
- set the handler's funciton pointer so when called it returns the PID
- of the terminated process. This is better, but it is still not
- perfect. The likelyhood of A being killed is still finite. Extended
- even more, make it so the kernel would not kill the leader of one
- of these process groups until it really had to. This entails
- making the sort that determines the process to be killed a n+1
- dimensional sort where it is currently a n dimensional sort.
-
- Thats enough blather on my part.
- --
- Frank E Perdicaro, Systems Admin, etc. Xyvision Color Systems
- Legalize guns, drugs and cash...today. 101 Edgewater Drive
- inhouse: frank@marvin, x5572 Wakefield MA
- outhouse: frank@contex.com, 617-245-4100x5572 018801285
-