[PD] pd-watchdog

Frank Barknecht fbar at footils.org
Thu Nov 7 11:25:05 CET 2002


Hi,
Ben Saylor hat gesagt: // Ben Saylor wrote:

> I sometimes encounter situations where Pd (0.35/Linux) spontaneusly
> starts eating all available CPU, and I have to wait until I can get a
> keystroke in edgewise to kill it.  While this is going on,
> 
>   watchdog: signaling pd...
> 
> is printed repeatedly in the terminal, but apparently this watchdog
> is unsuccessful.  Is it supposed to turn off DSP or something?

You're running pd with "-rt"? Then Pd gets a very high priority, which
is good for latency, but might make your system unusable, if for
example you have an indefinie loop in your patch ("bang~" and "until"
are great for such loops) or something else goes wrong. To prevent
this, PD has a watchdog process running, that has an even higher
priority, but does nothing most of the time. I does however check,
that the rest of Pd is running by "ping" messages. If no messages
arrive for a certain time, the watchdog concludes, that something is
very wrong and even tries to kill Pd.

see src/s_inter.c: 
  
  /* To prevent lockup, we fork off a watchdog process with
  higher real-time priority than ours.  The GUI has to send
  a stream of ping messages to the watchdog THROUGH the Pd
  process which has to pick them up from the GUI and forward
  them.  If any of these things aren't happening the watchdog
  starts sending "stop" and "cont" signals to the Pd process
  to make it timeshare with the rest of the system.  (Version
  0.33P2 : if there's no GUI, the watchdog pinging is done
  from the scheduler idle routine in this process instead.) */

ciao
-- 
 Frank Barknecht                               _ ______footils.org__




More information about the Pd-list mailing list