Subject: Re: [linux-audio-dev] RT scheduling, root and end users. (was: Re: [rtl] virtual memory in RTL)
From: Karl W. MacMillan (karlmac_AT_peabody.jhu.edu)
Date: Fri Mar 24 2000 - 19:49:56 EET
>
> Yes, but only if applications can freeze (the user space part of) the system
> indefinitely - which they can, unless there is some kind of watchdog thread or
> a kernel level timeout for repeated scheduling of a single task (SCHED_RR) or
> no rescheduling at all (SCHED_FIFO).
>
> A user space watchdog could probably be realized as a daemon with two threads,
> one SCHED_OTHER and one at SCHED_FIFO, highest priority, that try to communicate
> regularly. Upon repeated failure to get the SCHED_OTHER thread to run, the
> SCHED_FIFO thread (driven by some timer or other kernel "time base") would kill
> all processes with SCHED_FIFO and SCHED_RR threads belonging to the RT group,
> all non-root users or whatever you like.
>
PureData does something similar when running SCHED_FIFO. PD is three
programs - pd, pd-gui, and pd-watchdog. The user-interface (pd-gui),
which runs with normal priority, communicates with pd (SCHED_FIFO) over a
socket. The gui sends regular 'pings' to the pd process which forwards
them to the pd-watchdog (SCHED_FIFO with a higher priority than pd). If
pd-watchdog doesn't receive the pings at regularly intervals it sends
SIGHUP to pd which causes the application to sleep briefly. Works great.
Karl
_____________________________________________________
| Karl W. MacMillan |
| Peabody Institute of the Johns Hopkins University |
| Network and Telecommunications Services |
| karlmac_AT_peabody.jhu.edu |
| 410/659-8297 |
-----------------------------------------------------
This archive was generated by hypermail 2b28 : Fri Mar 24 2000 - 20:39:27 EET