[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-rt
Subject: [rtl] 1 msec timeslices in Linux scheduler
From: steve rosenbluth <stever () la ! creatureshop ! henson ! com>
Date: 1998-12-28 18:02:46
[Download RAW message or body]
--
Steve Rosenbluth
Jim Henson's Creature Shop
2821 Burton St, Burbank CA
(818) 953-3030
["1msec-rtl.txt" (text/plain)]
This is a clarification of my previous message:
I havent found any way to force a linux user space process to run immediately
after my real-time IRQ handler. I'm trying to decrease the timeslice duration
in Linux so my soft real time app has a faster response to what the real time
handler has done.
How can I force the linux kernel scheduler to give processes only 1 millisecond
maximum per timeslice ?
I have changed the HZ variable in param.h from 100 to 1000, and my
rt-2.0.35 kernel runs fine.
This is the linux process which should show me the duration of my new linux
timeslices:
int main(void)
{
if (ioperm(LPT, 8 , 1) < 0) {
fprintf(stderr,"ioperm: error accessing IO-port. Root Privileges required\n");
exit(-1);
}
while(1) {
outb(0,LPT);
usleep(1); /* here we get scheduled away */
outb(1,LPT);
usleep(1); /* here we get scheduled away too */
}
return 0;
}
I see (on an O-scope) my process runs every 2 msec, (as opposed to every 20 msec
when HZ was 100). Why doesn't this process run every millisecond ? !!!
I tried changing DEF_PRIORITY in sched.h from (20*HZ/100) to (10*HZ/100)
but this apparently didn't have the effect I wanted: my O-scope still
shows 2 msec timeslices. (I admit I don't know how DEF_PRIORITY is used
in the linux scheduler.)
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic