Thanks to Marshall Jose, CW Wright, and Bernhard Kuhn, and Jerry Eplin
who have responded so far.

Its still a mystery why a process in linux-user-space which gets
scheduled out doesn't come back for two timeslices. Does anyone
understand the Linux kernel scheduler well enough to explain that ? try
the code I posted yesterday.

My real goal is to do these three jobs 60 times per second:
1. data acquisition (currently done in a 33Khz burst by RTL)
2. linux-user-space, soft-real-time, variable length motion control
calc's
3. send serial 'results' packet out. this must be highly accurate and
periodic, as an embedded processor is clocked off of it.

So, I should transform job no. 3 into another RT task which does the
serial sending from the RT-comm interface. This could be invoked enough
time after job no.1 for job no. 2 to finish.  Does anyone know: the
RT-comm lib is  interrupt driven, right ?

The very first approach I tried was to create a linux-user-space process
which blocks on a RTfifo, a RT periodic task sent a word down the fifo
at 60 Hz. This did NOT work well. The linux task was invoked irregularly
depending on what other processes and IO were happening concurrently.

The best luck I've had has been with making my Linux process periodic
with setitimer() (software interrupt) and POSIX high-priority with
sched_setscheduler(). Unfortunately this does not produce _completely_
accurate timing when the hard drive, ethernet, and X (particularly X !!)
are running.
Additionally, this soft real time accuracy improved when I switched to
1msec timeslices. Worst case jitter caused by concurrent processes and
IO was reduced from approx +/-10ms to approx +/-1.5ms. I can mail a
graphic of a 2 minute stress-test if anybody is interested. So I suggest
this approach to others.

-- 
Steve Rosenbluth
Jim Henson's Creature Shop
2821 Burton St, Burbank CA
(818) 953-3030

--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to