On 11/04/07, Jack Whorn <[EMAIL PROTECTED]> wrote:
> [...]
> As far as I have seen, Xenomai`s watchdog kills the currently running task 
> when >wd_count (which is increased every second) has reached 4. But when is 
> wd_count >reset? I have only seen wd_count being reset to zero whenever Linux 
> is scheduled. I >don`t understand how this can be sufficient (which obviously 
> is!), as I had expected it >being reset whenever *any* task is rescheduled. 
> How can the system know that it is >the currently running task that has 
> prevented Linux from being scheduled?
>

The comment in xnpod_watchdog_handler() is a bit misleading.

The idea is to avoid starvation of the linux kernel for more than 4
seconds, right. But this starvation can be well done either by one rt
task or a few which are running one by one. The watchdog will kill the
one that happens to run at 4-th second.

e.g. 2 tasks : task1 takes 3.98 s. and then task2 - just 0.05 second.
The watchdog handler will shoot task2, although the real problem is
task1.

Nevertheless, for the majority of cases, this problem happens when
some rt task is misbehaving (say, an endless loop under some
circumstances) and - the one that gets killed - is the one that
monopolise the CPU indeed.


-- 
Best regards,
Dmitry Adamushko

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to