home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / sgi / 16085 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  2.0 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: <3112@contex.contex.com>
  6. Date: 6 Nov 92 18:31:02 GMT
  7. References: <1992Nov4.065527.4867@shannon.ee.wits.ac.za> <1992Nov4.163355.12112@odin.corp.sgi.com>
  8. Sender: news@contex.contex.com
  9. Organization: Xyvision Design Systems
  10. Lines: 36
  11.  
  12. In article <1992Nov4.163355.12112@odin.corp.sgi.com> martyi@sgi.com writes:
  13. >Usually the message means that the system ran out of swap space, and killed
  14. >the process.  While it is typically the process with the high demand for
  15. >swap that is killed, it is not always: the system is desperate, and strikes
  16. >out at someone.
  17.  
  18. I have had a few go-arounds on this one.
  19.  
  20. Memory pigs may be killed by IRIX.  The algorithm for death is
  21. unpublishable ( so I have been told ).  The process is sent an
  22. uncatchable signal, is expunged, and a message is place in
  23. /usr/adm/SYSLOG by the kernel.
  24.  
  25. Thus, the only way to detect this type of action is to make your own
  26. operating system of sorts.  Not too difficult.  Process A gets a slice
  27. of shared memory, and a semaphore, then it forks, sets a timer and
  28. stays small.  Its child, B, puts the date in the slice of shm, and
  29. sets the semaphore, sets a timer, and grows big.
  30. Process A wakes, checks the shm,  If date is old, A checks SYSLOG for 
  31. message of death of B.  Date not old, process A wakes, checks the shm,
  32. and if its ok, resets the semaphore, and sleeps.  
  33. Process B's timer goes off, and it resets shm and semaphore.  
  34. They continue merrily along
  35. Process B eventaully dies, A finds old date, no evidence in SYSLOG, 
  36. concludes B has died a natural death, and kills itself after it cleans
  37. up its semaphore and shared memeory.
  38.  
  39. The meaning of 'old', 'date', 'timer', and 'sleep' can be tailored as
  40. needed.
  41.  
  42.  
  43. -- 
  44.      Frank E Perdicaro, Systems Admin, etc.        Xyvision Color Systems
  45.       Legalize guns, drugs and cash...today.        101 Edgewater Drive
  46.    inhouse: frank@marvin, x5572                Wakefield MA
  47. outhouse: frank@contex.com, 617-245-4100x5572        018801285
  48.