comp.lang.ada
 help / color / mirror / Atom feed
From: Mark Johnson <Mark_H_Johnson@Raytheon.com>
Subject: Re: Anyone using Ada with Real-Time Linux?
Date: Tue, 27 Nov 2001 09:19:56 -0600
Date: 2001-11-27T09:19:56-06:00	[thread overview]
Message-ID: <3C03AF1C.4F9CFA81@Raytheon.com> (raw)
In-Reply-To: 8QcM7.77531$XJ4.41637211@news1.sttln1.wa.home.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
 - 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






  parent reply	other threads:[~2001-11-27 15:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2001-11-28  2:47   ` DuckE
replies disabled

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