home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / sgi / 16201 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  3.1 KB

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