home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!destroyer!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!ersys!crs-sys!crs
- From: crs@crs-sys.uucp (Chris Gregors)
- Newsgroups: comp.realtime
- Subject: Where to stick the watchdog ?
- Summary: Kick the dog and make him bark!
- Keywords: kernals watchdog
- Message-ID: <1992Sep03.034229.13095@crs-sys.uucp>
- Date: Thu, 03 Sep 1992 03:42:29 GMT
- Reply-To: crs@crs-sys.UUCP (Chris Gregors)
- Organization: Confusion Control
- Lines: 27
-
- Recently I had an argument (discussion) with some co-workers regarding where
- is an appropriate place to kick a watchdog timer inside an application program.
-
- Their side was 'stick it in the lowest level routine in a non-kernal based
- application, or stick it in the null task in a real-time kernal.'
-
- I have problems with either solution. Assuming that a real-time kernal is
- rom'ed, and fully pre-emptive (don't ask about some of our other home brews),
- that the context switch would occur on some interrupt event. Quite possibly,
- even in a runaway situation, the null task could be executed. The dog gets
- kicked and life continues.
-
- In a non-realtime application, the suggestion of sticking the kick in a low
- level i/o function has problems. You need a function that is very periodic.
- But what if your application doesn't have such a function ? Stick it inside
- something like printf() ? Not periodic enough. Inside the main command loop or
- in the state-machine ? which state ? what about using a state-machine dispatch
- function and stick it there ? and ... and ...
-
- It seems to me that there is no generic, works every time place to put the
- kick for a watchdog.
-
- Thoughts ? Observations ?
-
- --
- | Chris Gregors aka General Mayhem |
- | The secrets of the universe are very simple, I just can't figure them out! |
-