home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / realtime / 1050 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  2.7 KB

  1. Path: sparky!uunet!munnari.oz.au!nutmeg!pjm
  2. Newsgroups: comp.realtime
  3. Subject: Re: Where to stick the watchdog? 
  4. Message-ID: <1992Sep4.085016.3717@darwin.ntu.edu.au>
  5. From: pjm@nutmeg.cs.ntu.edu.au (Phil Maker)
  6. Date: 4 Sep 92 08:50:16 +0900
  7. Distribution: world
  8. Organization: Computer Science, Northern Territory University, Australia
  9. Keywords: Watchdogs
  10. Nntp-Posting-Host: nutmeg.ntu.edu.au
  11. Originator: pjm@nutmegLines: 67
  12. Lines: 67
  13.  
  14. > Recently I had an argument (discussion) with some co-workers regarding where
  15. > is an appropriate place to kick a watchdog timer inside an application program.
  16. > Their side was 'stick it in the lowest level routine in a non-kernal based
  17. > application, or stick it in the null task in a real-time kernal.'
  18. > I have problems with either solution. 
  19. > [ Lots of reasonable problems deleted ]
  20.  
  21. My suggestion for kicking watchdogs would be a little more complicated.
  22. (And I don't like watchdogs anyway but ...(And I don't like complicated 
  23. solutions but ..)).
  24.  
  25. First lets determine what errors we would like to catch in the best of
  26. all possible worlds.
  27.  
  28. * Processor interrupts disabled or kernel crashed so that some
  29.   processes cannot be executed. 
  30.  
  31.     Use a low priority timer interrupt to start a low priority
  32.     process which actually kicks the dog. (This provides a better
  33.     test of the kernel and general health of the system).
  34.     Of course timing deadlines come in to this but they are
  35.     easy to solve aren't they. (:-))
  36.  
  37. * Code or data store trashed by cosmic rays, software errors and hardware
  38.   features.
  39.  
  40.     Have a self test process that checksums the code every whatever
  41.     pico seconds. The data space can have its integrity checked by
  42.     having a data OK function provided by each module (or class). 
  43.     This is very useful for testing and debugging and if you have
  44.     the space in the product you could actually check some 
  45.     of the data structures out on the fly to see that they
  46.     meet the designers beliefs. 
  47.  
  48. * Checking that the system is actually working, i.e. making progress 
  49.   towards the goals of the system.
  50.  
  51.     For example every hard real time event put a counter in the
  52.     system. If these do NOT increase at the appropriate
  53.     frequency then something is wrong. The test for these
  54.     increases would done in the watchdog process.
  55.     Intermittent events require the use of flags etc to
  56.     determine if progress should be increasing but the method
  57.     still applies. 
  58.  
  59. Final note: any rational engineer would of course implement a small 
  60.     subset of the above. Error detection and correction is
  61.     one of the most difficult areas of real time systems. 
  62.     The best approach is to avoid the errors in the first place
  63.     and have outside safety systems. (Not reliablity).,
  64.  
  65.  
  66.                 Phil Maker
  67.  
  68.                 N.T. University
  69.                 Darwin, Australia.
  70.                 
  71.  
  72.  
  73.  
  74.  
  75.  
  76.     
  77.         
  78.  
  79.