I was just playing with Alberto Zin's OuterSpace on my poor old 800
MHz laptop. When I opened it the first time, it pegged my CPU and
locked me out. I had to power cycle my machine. This isn't the
first time something like this has happened to me, so now I did
something about it:
I wrote [failsafe]. When the CPU is pegged, it first tries turning
off the DSP (this could also easily turn off Gem rendering). If that
fails, it will quit Pd, thus saving the poor machine the hard reset.
http://pure-data.cvs.sourceforge.net/pure-data/externals/hcs/general/ failsafe.pd
http://pure-data.cvs.sourceforge.net/pure-data/externals/hcs/general/ doc/failsafe-help.pd
Ultimately, I think that something like this should be built into Pd,
which makes me think that there should be a way to run Pd patches as
init scripts for Pd. They would be hidden, unless you made them
viewable. Maybe something like a patch embedded in the Pd window.
.hc
I spent 33 years and four months in active military service and
during that period I spent most of my time as a high class muscle man
for Big Business, for Wall Street and the bankers. - General
Smedley Butler
Hi HC,
Hans-Christoph Steiner wrote:
I wrote [failsafe]. When the CPU is pegged, it first tries turning off the DSP (this could also easily turn off Gem rendering). If that fails, it will quit Pd, thus saving the poor machine the hard reset.
usually if I'm working on something "risky" I just assign a key (or MIDI control) to toggle DSP on and off in case of CPU overload. I wouldn't want PD to quit on me with unsaved work, however, so I'm not too sure about that function in your [failsafe]. One can always SSH into the laptop and kill PD as well...
d.
On Nov 13, 2006, at 7:55 PM, derek holzer wrote:
Hi HC,
Hans-Christoph Steiner wrote:
I wrote [failsafe]. When the CPU is pegged, it first tries
turning off
the DSP (this could also easily turn off Gem rendering). If that
fails,
it will quit Pd, thus saving the poor machine the hard reset.
usually if I'm working on something "risky" I just assign a key (or
MIDI control) to toggle DSP on and off in case of CPU overload. I
wouldn't want PD to quit on me with unsaved work, however, so I'm
not too sure about that function in your [failsafe]. One can always
SSH into the laptop and kill PD as well...
Ctrl-. turns off DSP and Ctrl-/ turns it on (Cmd on the Mac).
The only time that the automatic quit would be called is when Pd has
pegged the CPU so bad that you loose interactivity. Then ssh or
anything else won't help you. This can happen quite easily when
running heavy Gem patches using the realtime flag on older
computers. It can also happen with a ton of audio processing. The
idea is that Pd will quit itself rather than you having to power-
cycle the computer. Either way the unsaved data would be lost, but I
think you'll agree that it is good to avoid hard resets.
I am sure that some fine tuning of [failsafe] will be needed. But
basically, right now, it'll quit Pd if the machine is unresponsive
for 10 seconds. That probably should be longer. Also, there might
need to be platform-specific numbers for this patch. I only tested
this on Mac OS X.
.hc
Terrorism is not an enemy. It cannot be defeated. It's a tactic.
It's about as sensible to say we declare war on night attacks and
expect we're going to win that war. We're not going to win the war
on terrorism. - retired U.S. Army general, William Odom
On Mon Nov 13, 2006 at 05:48:38PM -0500, Hans-Christoph Steiner wrote:
I was just playing with Alberto Zin's OuterSpace on my poor old 800 MHz laptop. When I opened it the first time, it pegged my CPU and locked me out. I had to power cycle my machine. This isn't the first time something like this has happened to me, so now I did something about it:
brings back memories of loading Twerk's MSP patches on a G3 Mac. im pretty sure id resort to 'force quit'.
I wrote [failsafe]. When the CPU is pegged, it first tries turning off the DSP (this could also easily turn off Gem rendering). If that fails, it will quit Pd, thus saving the poor machine the hard reset.
sounds like its duplicating much of what the pd watchdog does. although im not sure what the job of the watchdog is, other than kill pd when its using too much cpu or blocked on gui socket transfers. more like some kind of attack dog waiting until the victim is vulnerable..
On Nov 14, 2006, at 3:41 AM, carmen wrote:
On Mon Nov 13, 2006 at 05:48:38PM -0500, Hans-Christoph Steiner wrote:
I was just playing with Alberto Zin's OuterSpace on my poor old
800 MHz laptop. When I opened it the first time, it pegged my CPU
and locked me out. I had to power cycle my machine. This isn't the first time something like this
has happened to me, so now I did something about it:brings back memories of loading Twerk's MSP patches on a G3 Mac. im
pretty sure id resort to 'force quit'.I wrote [failsafe]. When the CPU is pegged, it first tries
turning off the DSP (this could also easily turn off Gem
rendering). If that fails, it will quit Pd, thus saving the poor machine the hard reset.sounds like its duplicating much of what the pd watchdog does.
although im not sure what the job of the watchdog is, other than
kill pd when its using too much cpu or blocked on gui socket
transfers. more like some kind of attack dog waiting until the
victim is vulnerable..
Yeah, I guess that's what the watchdog is supposed to do, but it
doesn't work for me at least, and this patch does. Plus its got the
advantage of being written in Pd.
.hc
¡El pueblo unido jamás será vencido!