Subject: [linux-audio-dev] [RFC SOURCE] rt_monitor take 2
From: Roger Larsson (roger.larsson_AT_skelleftea.mail.telia.com)
Date: Tue Sep 03 2002 - 03:02:31 EEST
With this monitor any process can request RT priorities.
If those (or other) processes overloads the system.
They will be returned to normal priorities.
Note:
* this code is still experimental. I had a complete
lockup because my busy system detection did not work...
(removed since it was not necessary)
* It does probably not work on SMP - I have not given it
much of a thought yet...
compile the source:
gcc -Wall rt.c -o rt
gcc -Wall rt_monitor.c -o rt_monitor
then as root:
mkfifo -m 622 /var/named/rt-request
./rt_monitor
start another shell (as a normal user - non root)
./rt
output from ./rt will look like this
policy 0 <- does not have RT priority
policy 0 <- request sent, waiting...
..
policy 1 <- got rt prio
<- sleeps for 5 s
<- lockup!!! (for about 4 s)
<- rt_monitor reduces the prio, rt exits when detected
/RogerL
-- Roger Larsson Skellefteċ Sweden
This archive was generated by hypermail 2b28 : Tue Sep 03 2002 - 03:17:07 EEST