Ish Rattan wrote:

> On Mon, 4 Feb 2002, Saikrishnan Krishnamurthy wrote:
> 
> 
>>    1) Is there any means in linux kernel to offer a kernel thread, a
>>real-time priority. (I tried assigning the SCHED_RR and SCHED_FIFO to my
>>threads and it would hang my computer not measuring anythin
>>
> Linux kernel has no notion of real-time and hence priority.


Uhh... are you smoking crack?

I'm happy to acknowledge that scheduling latencies are rather uncertain 
but it definately knows and respects SCHED_RR and SCHED_FIFO.  I use 
SCHED_FIFO for soft real-time tasks.  They have been supported for a 
LOOOONG time!

I didn't read the original post, but it is more likely that the kernel 
thread never slept and thus never allowed the rest of the system a 
chance to run.  ...as in, it was doing exactly what a prioritized 
scheduler should do.

Also, without the preemptive kernel patch, even a non-realtime thread in 
the kernel will block everything if it doesn't sleep.


> 
> 
>>    2) If I code my program under rt-linux would I be able to use the atm
>>socket features under real-time ??. (accessing atm sockets in nonRT linux
>>and transporting the packets to real-time linux using FIFOs would'nt help
>>as I need to receive packets at real-time not just process it).
>>
> 
> You will have to take the plunge and try it. You will have to write a
> real-time ATM driver to tackle the problem.


First figure out what the original problem is.  If is a lack of sleeping 
on the part of his real-time threads then he will have exactly the same 
problem under RTLinux.

Depending on system activities, SCHED_FIFO under "normal" linux will 
give you worst case latencies as low as 5ms (if HZ is defined to be 
1024) and as high as 60ms or so.  Higher might be possible depending on 
activities.

For soft realtime applications I patch the kernel to set HZ to 1024 and 
set the scheduling policy to SCHED_FIFO.  I have recently started using 
the preemptive kernel patch and lock break patches maintained by Robert 
Love.  With this configuration typical latencies are a 100us or so, but 
worst case is still around 60ms for some system activities (hard disk IO 
in particular).

Kernel preemption patches at:  http://www.tech9.net/rml/linux/

> 
> -ishwar
> 
> -- [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/
> 



-- 
Tyson D Sawyer                             iRobot Corporation
Senior Systems Engineer                    Military Systems Division
[EMAIL PROTECTED]                         Robots for the Real World
603-532-6900 ext 206                       http://www.irobot.com

-- [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/

Reply via email to