From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dfedbe83126d2210 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-27 07:45:07 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3C03AF1C.4F9CFA81@Raytheon.com> From: Mark Johnson X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Anyone using Ada with Real-Time Linux? References: <8QcM7.77531$XJ4.41637211@news1.sttln1.wa.home.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 27 Nov 2001 09:19:56 -0600 NNTP-Posting-Host: 192.27.48.44 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1006874400 192.27.48.44 (Tue, 27 Nov 2001 09:20:00 CST) NNTP-Posting-Date: Tue, 27 Nov 2001 09:20:00 CST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:17048 Date: 2001-11-27T09:19:56-06:00 List-Id: 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