[Asterisk-Dev] Bug 3203 "Get RT without runaway risk" revisited

Steve Kann stevek at stevek.com
Fri Aug 5 09:20:21 MST 2005


Herman Webley wrote:

> On 08/05/05 10:46:13, Tzafrir Cohen wrote:
>
>> But on a 100%cpu loop the watchdog process may never get a chance
>> to run its code as Asterisk takes literally 100% of the CPU. The
>> watchdog should have real-time priority as well, right?
>
>
> It seems it works this way:
> The watchdog is not realtime priority, thus it does not get to signal 
> the wrapper, the wrapper (which is itself realtime) in turn realizes 
> that the asterisk process has run away. Perhaps the the naming of the 
> components is not clear.


There's three processes involved:

1) asterisk itself: runs as a RT process with priority P.
2) The "canary". This runs as a normal process, with normal priority.
3) The "watchdog". This runs with a higher RT priority than asterisk.

If the watchdog cannot talk to the canary for a while, it will whack 
asterisk with a priority stick, making it into a normal process.

I have this system working now, but we haven't been able to clean up and 
prettify the code to put it on mantis, but if anyone wants it, let me know.

-SteveK




More information about the asterisk-dev mailing list