comp.lang.ada
 help / color / mirror / Atom feed
* Anyone using Ada with Real-Time Linux?
@ 2001-11-25 20:50 DuckE
  2001-11-26  8:25 ` Per Sandbergs
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: DuckE @ 2001-11-25 20:50 UTC (permalink / raw)


I've been looking into using Ada with one of the real-time flavors of Linux.

It appears there are 3 flavors of real-time Linux (at least):
  RTLinux - Provides a primative real-time layer that communicates with user
level Linux using queues.
  RTAI - Provides a primative real-time layer, but also provides more
traditional real-time constructs such as semaphores.
  MontaVista - (I don't know if there's a non-company name for this version)
Substitutes a different scheduler that changes the behavior of "real-time"
priority tasks such that the highest priority real-time task is always
scheduled, but doesn't do anything to avoid having interrupts turned off.

A while back ACT announced that Zenotropix was partenering with GNAT to
produce Ada support, but it appears that they have been acquired by Lineo.

It appears that GNAT 3.13p includes some support of rt-linux since there is
a test for a rt-linux target in the Makefile.in file included with the
distribution, but not all of the files needed are present in the
distribution.

I have an application that acquires data at 1 msec intervals, processes the
accumulated data and  transmits a summary of the data across a network every
330 msec.  The application is currently written in C and runs on VxWorks.
Moving the application to a different target, still under VxWorks means
shelling out another $30K to Wind River, plus $200 per target (at least).
If I can come up with a less expensive choice using Ada, ths may provide an
opportunity for a swithc.

Thanks for any feedback,
SteveD






^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-25 20:50 Anyone using Ada with Real-Time Linux? DuckE
@ 2001-11-26  8:25 ` Per Sandbergs
  2001-11-26 17:27   ` Brian Catlin
                     ` (2 more replies)
  2001-11-27  1:35 ` Wayne Bullaughey
                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 16+ messages in thread
From: Per Sandbergs @ 2001-11-26  8:25 UTC (permalink / raw)


This sounds like soft realtime to me.
We made a measurment on WinNT4 on a double CPUmachine and got no problems at
all to meet deadlines of 1 ms with windows runing.
So if you got only two threads on the CPU, one sampler running at high
priority and one sender runing at lower priority i wold not be
suprized if almost "any" operating system with non blocking io would do.
Depending on your budget time and mony why dont do a test with a skeleton
program and measuere the results, package "ada.realtime" provides an
excelent interface for time measurment.

As a note:
    There was a masters thesis done comparing WinNT and RH linux out of the
box and they performed almost equal.

/Per Sandberg

"DuckE" <nospam_steved94@home.com> wrote in message
news:8QcM7.77531$XJ4.41637211@news1.sttln1.wa.home.com...
> I've been looking into using Ada with one of the real-time flavors of
Linux.
>
> It appears there are 3 flavors of real-time Linux (at least):
>   RTLinux - Provides a primative real-time layer that communicates with
user
> level Linux using queues.
>   RTAI - Provides a primative real-time layer, but also provides more
> traditional real-time constructs such as semaphores.
>   MontaVista - (I don't know if there's a non-company name for this
version)
> Substitutes a different scheduler that changes the behavior of "real-time"
> priority tasks such that the highest priority real-time task is always
> scheduled, but doesn't do anything to avoid having interrupts turned off.
>
> A while back ACT announced that Zenotropix was partenering with GNAT to
> produce Ada support, but it appears that they have been acquired by Lineo.
>
> It appears that GNAT 3.13p includes some support of rt-linux since there
is
> a test for a rt-linux target in the Makefile.in file included with the
> distribution, but not all of the files needed are present in the
> distribution.
>
> I have an application that acquires data at 1 msec intervals, processes
the
> accumulated data and  transmits a summary of the data across a network
every
> 330 msec.  The application is currently written in C and runs on VxWorks.
> Moving the application to a different target, still under VxWorks means
> shelling out another $30K to Wind River, plus $200 per target (at least).
> If I can come up with a less expensive choice using Ada, ths may provide
an
> opportunity for a swithc.
>
> Thanks for any feedback,
> SteveD
>
>
>





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-26  8:25 ` Per Sandbergs
@ 2001-11-26 17:27   ` Brian Catlin
  2001-11-26 19:52     ` Per Sandberg
  2001-11-26 19:03   ` Ted Dennison
  2001-11-27  6:34   ` Michael Bode
  2 siblings, 1 reply; 16+ messages in thread
From: Brian Catlin @ 2001-11-26 17:27 UTC (permalink / raw)


"Per Sandbergs" <prsa@cntw.com> wrote in message
news:C%mM7.1835$Cp.5182@news1.bredband.com...
[...snip...]
>
> As a note:
>     There was a masters thesis done comparing WinNT and RH linux out of the
> box and they performed almost equal.

Do you have a reference for this?

 -Brian







^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-26  8:25 ` Per Sandbergs
  2001-11-26 17:27   ` Brian Catlin
@ 2001-11-26 19:03   ` Ted Dennison
  2001-11-27  2:23     ` DuckE
  2001-11-27  6:34   ` Michael Bode
  2 siblings, 1 reply; 16+ messages in thread
From: Ted Dennison @ 2001-11-26 19:03 UTC (permalink / raw)


In article <C%mM7.1835$Cp.5182@news1.bredband.com>, Per Sandbergs says...
>
>This sounds like soft realtime to me.
>We made a measurment on WinNT4 on a double CPUmachine and got no problems at
>all to meet deadlines of 1 ms with windows runing.

He said he had trouble with the extra $200 price tag per unit. Windows would
have that problem too.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html

No trees were killed in the sending of this message. 
However a large number of electrons were terribly inconvenienced.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-26 17:27   ` Brian Catlin
@ 2001-11-26 19:52     ` Per Sandberg
  0 siblings, 0 replies; 16+ messages in thread
From: Per Sandberg @ 2001-11-26 19:52 UTC (permalink / raw)


Well i miss the ISBN and electronic copy but the thesis is:
	Real Time: Windows NT versus Linux
	by Henrik Siltberg.
	At the "Uppsala Universitet" (University un Uppsala) dated 2001-08-09

The reason to do this was that NT4 already had proven that it runs and
we wantet to know
if Linux did as well.

/Per



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-25 20:50 Anyone using Ada with Real-Time Linux? DuckE
  2001-11-26  8:25 ` Per Sandbergs
@ 2001-11-27  1:35 ` Wayne Bullaughey
  2001-12-01 15:52   ` Harri J Haataja
  2001-11-27  8:45 ` Dmitry A. Kazakov
  2001-11-27 15:19 ` Mark Johnson
  3 siblings, 1 reply; 16+ messages in thread
From: Wayne Bullaughey @ 2001-11-27  1:35 UTC (permalink / raw)


We've had good luck using RTEMS (www.rtems.com). Its not Linux but it has a
POSIX compatible library, is open source and is ported to a number of
different processors. Its easy to use both Ada and C with it using Gnat/gcc.
It's schedule is specifically designed for real time.

"DuckE" <nospam_steved94@home.com> wrote in message
news:8QcM7.77531$XJ4.41637211@news1.sttln1.wa.home.com...
> I've been looking into using Ada with one of the real-time flavors of
Linux.
>
> It appears there are 3 flavors of real-time Linux (at least):
>   RTLinux - Provides a primative real-time layer that communicates with
user
> level Linux using queues.
>   RTAI - Provides a primative real-time layer, but also provides more
> traditional real-time constructs such as semaphores.
>   MontaVista - (I don't know if there's a non-company name for this
version)
> Substitutes a different scheduler that changes the behavior of "real-time"
> priority tasks such that the highest priority real-time task is always
> scheduled, but doesn't do anything to avoid having interrupts turned off.
>
> A while back ACT announced that Zenotropix was partenering with GNAT to
> produce Ada support, but it appears that they have been acquired by Lineo.
>
> It appears that GNAT 3.13p includes some support of rt-linux since there
is
> a test for a rt-linux target in the Makefile.in file included with the
> distribution, but not all of the files needed are present in the
> distribution.
>
> I have an application that acquires data at 1 msec intervals, processes
the
> accumulated data and  transmits a summary of the data across a network
every
> 330 msec.  The application is currently written in C and runs on VxWorks.
> Moving the application to a different target, still under VxWorks means
> shelling out another $30K to Wind River, plus $200 per target (at least).
> If I can come up with a less expensive choice using Ada, ths may provide
an
> opportunity for a swithc.
>
> Thanks for any feedback,
> SteveD
>
>
>





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-26 19:03   ` Ted Dennison
@ 2001-11-27  2:23     ` DuckE
  0 siblings, 0 replies; 16+ messages in thread
From: DuckE @ 2001-11-27  2:23 UTC (permalink / raw)


I have little difficulty with a $200 price tag per unit if it does not
include a $30K price up front for a development system.

SteveD

"Ted Dennison" <dennison@telepath.com> wrote in message
news:LlwM7.38242$xS6.62556@www.newsranger.com...
> In article <C%mM7.1835$Cp.5182@news1.bredband.com>, Per Sandbergs says...
> >
> >This sounds like soft realtime to me.
> >We made a measurment on WinNT4 on a double CPUmachine and got no problems
at
> >all to meet deadlines of 1 ms with windows runing.
>
> He said he had trouble with the extra $200 price tag per unit. Windows
would
> have that problem too.
>
> ---
> T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
>
> No trees were killed in the sending of this message.
> However a large number of electrons were terribly inconvenienced.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-26  8:25 ` Per Sandbergs
  2001-11-26 17:27   ` Brian Catlin
  2001-11-26 19:03   ` Ted Dennison
@ 2001-11-27  6:34   ` Michael Bode
  2 siblings, 0 replies; 16+ messages in thread
From: Michael Bode @ 2001-11-27  6:34 UTC (permalink / raw)


"Per Sandbergs" <prsa@cntw.com> writes:


> We made a measurment on WinNT4 on a double CPUmachine and got no problems at
> all to meet deadlines of 1 ms with windows runing.
> So if you got only two threads on the CPU, one sampler running at high
> priority and one sender runing at lower priority i wold not be
> suprized if almost "any" operating system with non blocking io would do.

How do you get only 2 threads on a NT machine? Normally there are
dozens of threads.

> As a note:
>     There was a masters thesis done comparing WinNT and RH linux out of the
> box and they performed almost equal.

That seems to fit together with 

  http://www.rtlinux.org/documents/papers/rtmanifesto/rtlmanifesto.html

where they say the exactly same: both have equally poor realtime
performance. However transforming NT in a realtime OS means paying to
Venturcom or similar companies while RTLinux (not to be confused with
RH Linux) claims to be realtime and is free.

Before anyone proves that RTLinux is no realtime too, I will admit
that I have zero experience with it. My only realtime experience is
with programming a kind of VxWorks called MCore in IEC1131.




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-25 20:50 Anyone using Ada with Real-Time Linux? DuckE
  2001-11-26  8:25 ` Per Sandbergs
  2001-11-27  1:35 ` Wayne Bullaughey
@ 2001-11-27  8:45 ` Dmitry A. Kazakov
  2001-11-27  9:19   ` Simon Wright
  2001-11-27 15:19 ` Mark Johnson
  3 siblings, 1 reply; 16+ messages in thread
From: Dmitry A. Kazakov @ 2001-11-27  8:45 UTC (permalink / raw)


On Sun, 25 Nov 2001 20:50:12 GMT, "DuckE" <nospam_steved94@home.com>
wrote:

>I have an application that acquires data at 1 msec intervals, processes the
>accumulated data and  transmits a summary of the data across a network every
>330 msec.  The application is currently written in C and runs on VxWorks.
>Moving the application to a different target, still under VxWorks means
>shelling out another $30K to Wind River, plus $200 per target (at least).
>If I can come up with a less expensive choice using Ada, ths may provide an
>opportunity for a swithc.

A question to wise men. Is above achievable under "normal" Linux,
provided that only Ada application is running and tasks are dispatched
by Ada RTS? Will hard disk I/O be a problem? TCP/IP socket I/O?

Regards,
Dmitry Kazakov



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-27  8:45 ` Dmitry A. Kazakov
@ 2001-11-27  9:19   ` Simon Wright
  2001-11-27 14:26     ` Dmitry A. Kazakov
  0 siblings, 1 reply; 16+ messages in thread
From: Simon Wright @ 2001-11-27  9:19 UTC (permalink / raw)


dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) writes:

> On Sun, 25 Nov 2001 20:50:12 GMT, "DuckE" <nospam_steved94@home.com>
> wrote:
> 
> >I have an application that acquires data at 1 msec intervals, processes the
> >accumulated data and  transmits a summary of the data across a network every
> >330 msec.  The application is currently written in C and runs on VxWorks.
> >Moving the application to a different target, still under VxWorks means
> >shelling out another $30K to Wind River, plus $200 per target (at least).
> >If I can come up with a less expensive choice using Ada, ths may provide an
> >opportunity for a swithc.
> 
> A question to wise men. Is above achievable under "normal" Linux,
> provided that only Ada application is running and tasks are
> dispatched by Ada RTS? Will hard disk I/O be a problem? TCP/IP
> socket I/O?

The main problem is the 1ms period. Under Linux 2.2 you can set the
kernel jiffy down to 0.5 ms by altering HZ to 2000 in asm/param.h,
alter linux/kernel/sched.c:sys_nanosleep to remove the busy-wait on
short delay requests up to 2 ms, and rebuild the kernel. You really
ought to rebuild the standard library too, since Linux doesn't have a
complete sysconf, but it seems to work pretty well (we've not used
this in production work yet, just in a testbed).

The reason for setting HZ to 2000 is that GNAT uses nanosleep to
implement delay, and nanosleep delays for 1 more jiffy than you
expected so that it can be sure to delay for at least the time
requested.

The final trick is to run your tasking Ada program as root. This puts
it into the SCHED_FIFO real-time dispatching class (to borrow a
Solaris-ism). There is a way to get SCHED_RR instead (under 3.14a1,
anyway; I expect it's one of the configuration pragmas if it's
anything like Solaris).

Whether this would fit the requirement I don't know; there might be
unavoidable delays, as Dmitry says.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-27  9:19   ` Simon Wright
@ 2001-11-27 14:26     ` Dmitry A. Kazakov
  2001-11-27 16:06       ` Florian Weimer
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry A. Kazakov @ 2001-11-27 14:26 UTC (permalink / raw)


On 27 Nov 2001 09:19:03 +0000, Simon Wright <simon.j.wright@amsjv.com>
wrote:

>dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) writes:
>
>> On Sun, 25 Nov 2001 20:50:12 GMT, "DuckE" <nospam_steved94@home.com>
>> wrote:
>> 
>> >I have an application that acquires data at 1 msec intervals, processes the
>> >accumulated data and  transmits a summary of the data across a network every
>> >330 msec.  The application is currently written in C and runs on VxWorks.
>> >Moving the application to a different target, still under VxWorks means
>> >shelling out another $30K to Wind River, plus $200 per target (at least).
>> >If I can come up with a less expensive choice using Ada, ths may provide an
>> >opportunity for a swithc.
>> 
>> A question to wise men. Is above achievable under "normal" Linux,
>> provided that only Ada application is running and tasks are
>> dispatched by Ada RTS? Will hard disk I/O be a problem? TCP/IP
>> socket I/O?
>
>The main problem is the 1ms period. Under Linux 2.2 you can set the
>kernel jiffy down to 0.5 ms by altering HZ to 2000 in asm/param.h,
>alter linux/kernel/sched.c:sys_nanosleep to remove the busy-wait on
>short delay requests up to 2 ms, and rebuild the kernel. You really
>ought to rebuild the standard library too, since Linux doesn't have a
>complete sysconf, but it seems to work pretty well (we've not used
>this in production work yet, just in a testbed).
>
>The reason for setting HZ to 2000 is that GNAT uses nanosleep to
>implement delay, and nanosleep delays for 1 more jiffy than you
>expected so that it can be sure to delay for at least the time
>requested.
>
>The final trick is to run your tasking Ada program as root. This puts
>it into the SCHED_FIFO real-time dispatching class (to borrow a
>Solaris-ism). There is a way to get SCHED_RR instead (under 3.14a1,
>anyway; I expect it's one of the configuration pragmas if it's
>anything like Solaris).

Thank you for this information.

[We are considering which OS platform to choose for an embedded "soft"
real-time system. Our requirements are: 5 ms for the DAQ & control
task and almost "no matter" for the TCP/IP tasks]

>Whether this would fit the requirement I don't know; there might be
>unavoidable delays, as Dmitry says.

I heard that the Linux kernel is (or will be) preemptive. If so, there
[I suppose] should be no big problem with I/O?

Regards,
Dmitry Kazakov



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-25 20:50 Anyone using Ada with Real-Time Linux? DuckE
                   ` (2 preceding siblings ...)
  2001-11-27  8:45 ` Dmitry A. Kazakov
@ 2001-11-27 15:19 ` Mark Johnson
  2001-11-28  2:47   ` DuckE
  3 siblings, 1 reply; 16+ messages in thread
From: Mark Johnson @ 2001-11-27 15:19 UTC (permalink / raw)


DuckE wrote:

> I've been looking into using Ada with one of the real-time flavors of Linux.
> [snip]
>
> I have an application that acquires data at 1 msec intervals, processes the
> accumulated data and  transmits a summary of the data across a network every
> 330 msec.  The application is currently written in C and runs on VxWorks.
> Moving the application to a different target, still under VxWorks means
> shelling out another $30K to Wind River, plus $200 per target (at least).
> If I can come up with a less expensive choice using Ada, ths may provide an
> opportunity for a swithc.

If you "must" sample at 1 msec, you have two alternatives...
 - use a hardware timer to trigger I/O
 - create a small data acquisition task under your choice of RTAI or RT Linux
In either case, run the rest of your application as RT_FIFO under Linux. To give
you an idea of Linux performance, I suggest...
  http://pets.lineo.com/
for some data from a year ago. Look for "worst case latencies". I was generally
able to reproduce the results they got. If you want, you can download a disk
image from...
  http://www.lineo.com/download/
and look for Atomic RTAI. Its a bootable disk w/ a kernel built w/ RTAI and
various instructions for running tests. If you want to go this way and need
support, I suggest talking with either FSM Labs or Lineo for RT Linux and RTAI
respectively. If you will roll your own - I suggest the various mailing lists
for each product.

If an occasional late sample is OK (data is time stamped), then a stock Linux is
OK if you are careful. Being careful includes...
 - set up your disk parameters for DMA
 - stay out of low memory situations
 - little or no disk I/O
 - build with the kernel preempt and/or low latency patches
A few good sites for reference include...
  http://www.tech9.net/rml/linux/
  http://kpreempt.sourceforge.net/
for recent kernel preemption, cpu affinity, and some lock time patches.
  http://www.uow.edu.au/~andrewm/linux/schedlat.html
  http://www.linuxdj.com/audio/lad/contrib/2.4-install-notes.html
for low latency information and patches.

Its my experience that you can still get a few stinkers on the order of a
microsecond or so if you get unlucky. For our large Ada system, that isn't a
problem - our fastest rate is 80hz (12.5 msec). We use a hardware clock to stay
in sync with real time, and hardware timers to trigger DMA transfers for the few
cases where we have a hard real time requirement.
  --Mark






^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-27 14:26     ` Dmitry A. Kazakov
@ 2001-11-27 16:06       ` Florian Weimer
  2001-11-28  8:29         ` Dmitry A. Kazakov
  0 siblings, 1 reply; 16+ messages in thread
From: Florian Weimer @ 2001-11-27 16:06 UTC (permalink / raw)


dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) writes:

> [We are considering which OS platform to choose for an embedded "soft"
> real-time system. Our requirements are: 5 ms for the DAQ & control
> task and almost "no matter" for the TCP/IP tasks]

If the 5ms are a *requirement*, it's not "soft" real time. ;-)
(And you shouldn't use a standard Linux version.)

>>Whether this would fit the requirement I don't know; there might be
>>unavoidable delays, as Dmitry says.
>
> I heard that the Linux kernel is (or will be) preemptive. If so, there
> [I suppose] should be no big problem with I/O?

Usually, I/O isn't the problem.  Some FS operations and console
switching are major offenders, IIRC.

Perhaps you don't need a preemptive kernel.  For 2.2.x, there are
patches which add additional scheduling points to lower average
latency (but I don't know if you get an exact 5ms timing, perhaps with
a kernel module using the real-time clock interrupt).



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-27 15:19 ` Mark Johnson
@ 2001-11-28  2:47   ` DuckE
  0 siblings, 0 replies; 16+ messages in thread
From: DuckE @ 2001-11-28  2:47 UTC (permalink / raw)


"Mark Johnson" <Mark_H_Johnson@Raytheon.com> wrote in message
news:3C03AF1C.4F9CFA81@Raytheon.com...
> DuckE wrote:
>
> > I've been looking into using Ada with one of the real-time flavors of
Linux.
> > [snip]
> >
> > I have an application that acquires data at 1 msec intervals, processes
the
> > accumulated data and  transmits a summary of the data across a network
every
> > 330 msec.  The application is currently written in C and runs on
VxWorks.
> > Moving the application to a different target, still under VxWorks means
> > shelling out another $30K to Wind River, plus $200 per target (at
least).
> > If I can come up with a less expensive choice using Ada, ths may provide
an
> > opportunity for a swithc.
>
> If you "must" sample at 1 msec, you have two alternatives...
>  - use a hardware timer to trigger I/O

Sampling is triggered by an external input (not a clock).  The signal is
generated by an incremental encoder.  On each encoder signal we read up to
1024 bytes of data.  The maximum frequency data becomes available is 1KHz,
thus the 1 msec sample rate (worst case).

>  - create a small data acquisition task under your choice of RTAI or RT
Linux
> In either case, run the rest of your application as RT_FIFO under Linux.
To give
> you an idea of Linux performance, I suggest...
>   http://pets.lineo.com/
> for some data from a year ago. Look for "worst case latencies". I was
generally
> able to reproduce the results they got. If you want, you can download a
disk
> image from...
>   http://www.lineo.com/download/
> and look for Atomic RTAI. Its a bootable disk w/ a kernel built w/ RTAI
and
> various instructions for running tests. If you want to go this way and
need
> support, I suggest talking with either FSM Labs or Lineo for RT Linux and
RTAI
> respectively. If you will roll your own - I suggest the various mailing
lists
> for each product.
>

This is certainly a valid approach, but in looking over the RTAI approach,
it occurred to me that there are likely sufficient primitives available that
an Ada run time library could be developed to work in the real-time
environment (semaphores, threads, etc).  I was wondering if this had already
been done.

  It would certainly be a nicer solution if I could do all of the work in
Ada using tasking, protected types and interrupts.

> If an occasional late sample is OK (data is time stamped), then a stock
Linux is
> OK if you are careful. Being careful includes...
>  - set up your disk parameters for DMA
>  - stay out of low memory situations
>  - little or no disk I/O
>  - build with the kernel preempt and/or low latency patches
> A few good sites for reference include...
>   http://www.tech9.net/rml/linux/
>   http://kpreempt.sourceforge.net/
> for recent kernel preemption, cpu affinity, and some lock time patches.
>   http://www.uow.edu.au/~andrewm/linux/schedlat.html
>   http://www.linuxdj.com/audio/lad/contrib/2.4-install-notes.html
> for low latency information and patches.

Looking at RTAI and RTLinux it appears that having the real time layer under
Linux might actually keep things simpler than having to be concerned about
the behavior of stock Linux.

> Its my experience that you can still get a few stinkers on the order of a
> microsecond or so if you get unlucky. For our large Ada system, that isn't
a
> problem - our fastest rate is 80hz (12.5 msec). We use a hardware clock to
stay
> in sync with real time, and hardware timers to trigger DMA transfers for
the few
> cases where we have a hard real time requirement.
>   --Mark
>

Thank you.
SteveD






^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-27 16:06       ` Florian Weimer
@ 2001-11-28  8:29         ` Dmitry A. Kazakov
  0 siblings, 0 replies; 16+ messages in thread
From: Dmitry A. Kazakov @ 2001-11-28  8:29 UTC (permalink / raw)


On Tue, 27 Nov 2001 17:06:01 +0100, Florian Weimer <fw@deneb.enyo.de>
wrote:

>dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) writes:
>
>> [We are considering which OS platform to choose for an embedded "soft"
>> real-time system. Our requirements are: 5 ms for the DAQ & control
>> task and almost "no matter" for the TCP/IP tasks]
>
>If the 5ms are a *requirement*, it's not "soft" real time. ;-)

It is a "requirement" (:-)). [ You know how it works, there are two
ways to deal with problems: 1) an obsolete one is to solve them, 2) a
biz one is to change the requirements. ]

>(And you shouldn't use a standard Linux version.)

Standard Linux has obvious advantages when the hardware configuration
should remain open. I mean driver support etc.

>>>Whether this would fit the requirement I don't know; there might be
>>>unavoidable delays, as Dmitry says.
>>
>> I heard that the Linux kernel is (or will be) preemptive. If so, there
>> [I suppose] should be no big problem with I/O?
>
>Usually, I/O isn't the problem.  Some FS operations and console
>switching are major offenders, IIRC.

The word "usually" is the major concern. Under WinNT it is also
usually no problem, but sometimes, some driver may block the whole
system for 100-200ms.

>Perhaps you don't need a preemptive kernel.  For 2.2.x, there are
>patches which add additional scheduling points to lower average
>latency (but I don't know if you get an exact 5ms timing, perhaps with
>a kernel module using the real-time clock interrupt).

About 2-3 years ago I played with i486, 2MB under Linux + gnat (I do
not remember which version it was). It easily reached "soft" 1ms with
parallel console output. By "soft" I mean that the "real-time" task
becomes active within each 1ms interval.

Regards,
Dmitry Kazakov



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Anyone using Ada with Real-Time Linux?
  2001-11-27  1:35 ` Wayne Bullaughey
@ 2001-12-01 15:52   ` Harri J Haataja
  0 siblings, 0 replies; 16+ messages in thread
From: Harri J Haataja @ 2001-12-01 15:52 UTC (permalink / raw)


Wayne Bullaughey wrote:
>We've had good luck using RTEMS (www.rtems.com). Its not Linux but it has a
>POSIX compatible library, is open source and is ported to a number of
>different processors. Its easy to use both Ada and C with it using Gnat/gcc.
>It's schedule is specifically designed for real time.

Anyone care to comment on QNX's? I would say it's at least POSIX-ish.

-- 
Seagoon: Will my aeroplane need a hangar?
Crun:    It'd lose its shape hanging on a nail, you know.
	-- T.A.Milligan & L.Stephens 10 Jan 1957



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2001-12-01 15:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-25 20:50 Anyone using Ada with Real-Time Linux? DuckE
2001-11-26  8:25 ` Per Sandbergs
2001-11-26 17:27   ` Brian Catlin
2001-11-26 19:52     ` Per Sandberg
2001-11-26 19:03   ` Ted Dennison
2001-11-27  2:23     ` DuckE
2001-11-27  6:34   ` Michael Bode
2001-11-27  1:35 ` Wayne Bullaughey
2001-12-01 15:52   ` Harri J Haataja
2001-11-27  8:45 ` Dmitry A. Kazakov
2001-11-27  9:19   ` Simon Wright
2001-11-27 14:26     ` Dmitry A. Kazakov
2001-11-27 16:06       ` Florian Weimer
2001-11-28  8:29         ` Dmitry A. Kazakov
2001-11-27 15:19 ` Mark Johnson
2001-11-28  2:47   ` DuckE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox