This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Watchdog


On Fri, Dec 17, 2004 at 01:04:41PM -0300, Daniel Gomes wrote:
> It also depends upon the kind of use you want for your
> watchdog.
> 
> Let's say, if you wish the watchdog to reset on
> possible software locks, like deadlocks or starvation
> scenarios, you should put your watchdog "kick" after
> the calls that may cause the hang.
> 
> If you put a watchdog kick in a high priority
> interruption, your software can stop working or lock,
> but the interruption may keeps the dog happy, even
> your main thread being locked.
> 
> I usually kick the watchdog in the last state of the
> state machine, after all possible harmfull calls had
> been called. But, this can cause problems in
> assynchronous calls ...

I've also done a meta-watchdog system. I have a high priority thread
which does the actually kicking. But that thread itself just receives
kicks from other threads. If any of the other threads stop kicking,
the "Watchdog" thread stops kicking the hardware.

Doing it like this i can put kicks into all threads which are
important so if any one deadlock's we get to know about it. I also put
one kicker at the lowest priority so that if we reach some sort of
livelock spinning condition which is eating all the CPU for a while we
get a reset.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]