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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,567f87f476bd8e1c X-Google-Attributes: gid103376,public From: rlk@rational.com (Bob Kitzberger) Subject: Re: Tips for realtime embedded Ada? Date: 1996/04/22 Message-ID: <4lgtnk$jm9@rational.rational.com>#1/1 X-Deja-AN: 150868647 references: <4ku9jf$b7u@hacgate2.hac.com> <4l54f0$sg0@fred.netinfo.com.au> organization: Rational Software Corporation newsgroups: comp.lang.ada Date: 1996-04-22T00:00:00+00:00 List-Id: Alan Brain (aebrain@dynamite.com.au) wrote: : 1) Don't use Tasking except as a Guardian of resources. Very few : compilers do context-switching efficiently. Write a scheduler in : assembler, or if you can, microcode. I would suggest that you first check the PIWG tasking benchmark results, and study the vendor's documentation on tasking, before throwing out the baby with the bathwater. "Passive tasking optimizations", performed by some vendors, can reduce context switching time by an order of magnitude, to the level of user-written semaphore-protected regions. Being able to specify concurrent behavior at the language level is very useful, so make sure you know what you're giving up, and why, before you run off and write your own scheduler. A good strategy to use is to hide your concurrent objects/classes within a package body -- never export a task via the package specification. You can use Ada tasking (encapsulated in the package body) during development, and if you ever need to replace the Ada task with something lower-level, for whatever reason, you can replace the body of the package without changing any clients (alter this strategy as appropriate for time-sliced applications, event-driven, etc.) -- Bob Kitzberger Rational Software Corporation rlk@rational.com