comp.lang.ada
 help / color / mirror / Atom feed
From: rlk@rational.com (Bob Kitzberger)
Subject: Re: Tips for realtime embedded Ada?
Date: 1996/04/22
Date: 1996-04-22T00:00:00+00:00	[thread overview]
Message-ID: <4lgtnk$jm9@rational.rational.com> (raw)
In-Reply-To: 4l54f0$sg0@fred.netinfo.com.au

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




  reply	other threads:[~1996-04-22  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-15  0:00 Tips for realtime embedded Ada? John Gluth
1996-04-16  0:00 ` Stephen M. Garriga
1996-04-16  0:00 ` Tom Griest
1996-04-16  0:00   ` Pat Rogers
1996-04-17  0:00 ` Daryl Siddon
1996-04-18  0:00 ` Alan Brain
1996-04-22  0:00   ` Bob Kitzberger [this message]
1996-04-23  0:00     ` Greg Bond
replies disabled

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