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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,40faddc97c0ae97b X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: GUI Design for Ada Date: 1999/10/29 Message-ID: <7vcd4p$r9q$1@nnrp1.deja.com>#1/1 X-Deja-AN: 542064095 References: <7vb03r$1ea$1@news5.fast.net> X-Http-Proxy: 1.0 x29.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Fri Oct 29 15:06:04 1999 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.6 [en] (WinNT; I) Date: 1999-10-29T00:00:00+00:00 List-Id: In article <7vb03r$1ea$1@news5.fast.net>, "Andrew" wrote: > However, the project I'm working on is a multi-process simulation > that runs on a dual PowerPC system. Out of curiosity, what OS are you using? > I'm looking for a good reference/tutorial type book that discusses > real-time programming in Ada that's new to this field. I'm not aware of an Ada book specific to real-time. Chapters 17 and 18 in Cohen's Ada as a Second Language cover a lot of the issues. We also have a couple of copies of A Practitioner's Handbook for Real-Time Analysis, which covers a lot of issues related to Rate-Monotonic systems in a language-neutral manner. In Ada you can make a simple rate-monotonic system by putting each scheduled item in its own task. Each task should set its priority relative to the other tasks to be the same as its iteration rate relative to the other tasks (using Ada.Dynamic_Priorities). A global package that keeps track of everyone's priority and rate (perhaps as read from a configuration file) can be useful for this purpose. Before its first iteration, each task should save the current value of Ada.Real_Time.Clock. At the end of each iteration, the task will add its iteration rate to the saved time, and perform a "delay until" that time. More sophistacted logic can be added to detect and handle overruns. We discovered on our project that with careful attention given to using standard Ada constructs rather than their OS equivalents, one can create an entire real-time simulation in Ada that is souce code portable to other OS/compiler combinations (excepting specialized hardware interfaces, of course). For instance, when hardware availability turned out to be a problem, we were able to compile and test early versions of our entire system on NT boxes using Gnat, even though the code was written for the GreenHills Ada cross-compiler for vxWorks. Of course you don't quite get real-time performance in NT. But if we needed to change RTOS's or compiler vendors, it would be an almost painless process. I am unaware of *any* other language that could provide this. -- T.E.D. Sent via Deja.com http://www.deja.com/ Before you buy.