Csound Csound-dev Csound-tekno Search About

[Cs-dev] Utility for --sched

Date2005-02-23 14:10
FromIstvan Varga
Subject[Cs-dev] Utility for --sched
Attachmentsrtwd.c  
Here is a simple utility for Linux that can terminate a Csound
process that has locked up the system as a result of too high
CPU usage with --sched. It takes a list of PIDs as argument.

An example of using the utility:

   su -c 'csound -d -m0 -H0 -s -h -o dac --sched ...'

     in another terminal:

   ps ax | grep csound

   14197 pts/6    S+     0:00 su -c ./csound -d -m0 -H0 ...
   14198 pts/6    SL+    0:06 ./csound -d -m0 -H0 -s -h ...

   ./rtwd 14198

Date2005-02-23 14:19
FromIstvan Varga
SubjectRe: [Cs-dev] Utility for --sched
Istvan Varga wrote:

> static int cnt = 0;

A minor correction: this line should be replaced with

static volatile int cnt = 0;


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-23 15:15
FromIstvan Varga
SubjectRe: [Cs-dev] Utility for --sched
Attachmentsrtwd2.c  
This is an improved version that will terminate all processes
(except itself) that have a thread with a scheduling policy
other than SCHED_OTHER in case of a lock-up.
It does not require any command line arguments, but an optional
parameter may be specified which sets the minimum PID value that
will receive SIGTERM/SIGKILL signals.