You could take a look at LXRT, which is part of RTAI, that makes
it possible to promote a userspace thread (or process) to a Realtime
task. Due to the internal setup you will loose a few usec in latency,
but
i haven't seen more than 30usec latency (appart with my S3 card and
XFree
4.0, but thats an other story). Also it will not be posible to make anny
system calls from the promoted threads/processes, but there is also
being
worked on. 

I use it because i have a large crosslinked object model , and need to
preform
certain actions on the model in real time ( 40 times a second ), and
display 
those actions at the same time. Because the displaying and the realtime
actions
not change the model there is no need for locking, because when you lock
it from
non realtime you of courrse loose realtime behavior in the realtime
task.

So becarefull when you start to need locks on the model , you will
probably
loose realtime, when your not carefull.

RTAI can be found at www.rtai.org

- Erwin



Dingrong Yi wrote:
> 
> Hello all RTLinux users and developers,
> 
> I need to schdule a  procedure  by a timer at every (around) 1 ms.  I
> set  the time interval of the XtAppAddTimeOut to be 1ms. But I am
> uncertain is the resolution of linux timer is such fine or not? Tijs
> suggested to modify parameter HZ of
> /usr/src/linux/include/asm-i386/param.h to 1024 for a 2ms timing
> (attached at the end). Does it  mean if modify HZ to 2048 may get a 1ms
> resolution timing? If so, what  should I do after this modification so
> that this modification may be  effective?
> 
> I am booting with RTLinux-2.0. The reason why I do this high frequency
> (1000 Hz)  task in linux instead of RTLinux is because this task need to
> use lots of  graphics, big memory (60M) for object modeling, etc which are
> cubersome to do in RTLinux.
> 
> Thanks in advance.
> 
> Dingrong Yi
> 
> > > Hi!
> > >
> > >   In RT-Linux Manifesto author writes:
> > >
> > >   "Standard Linux takes up to 600 microseconds to start a handler and
> can
> > >    easily be more than 20 milliseconds (20,000 microseconds) late for
> a
> > >    periodic task."
> > >
> > >   Is it possible to have 2 miliseconds ? I want to control very fast
> robot
> > > from rt-linux box.
> >
> > This works for x86 only:
> > Try using #define HZ 1024 or some other high number in
> > /usr/src/linux/include/asm-i386/param.h
> >
> > Usually it's 100 and that accounts for the (what I thought were 10) 20
> > ms.
> >
> > Note that this breaks some programs like 'top' and 'ps'
> >
> > --
> > Tijs van Bakel, <[EMAIL PROTECTED]>
> 
> -- [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/
-- [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