comp.lang.ada
 help / color / mirror / Atom feed
From: dmitry@elros.cbb-automation.de (Dmitry A. Kazakov)
Subject: Re: Anyone using Ada with Real-Time Linux?
Date: Tue, 27 Nov 2001 14:26:54 GMT
Date: 2001-11-27T14:26:54+00:00	[thread overview]
Message-ID: <3c039d8c.21235968@News.CIS.DFN.DE> (raw)
In-Reply-To: x7vy9kspo54.fsf@galadriel.frlngtn.gecm.com

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



  reply	other threads:[~2001-11-27 14:26 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 [this message]
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
replies disabled

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