comp.lang.ada
 help / color / mirror / Atom feed
From: Greg Bond <bond@ee.ubc.ca>
Subject: Re: Tips for realtime embedded Ada?
Date: 1996/04/23
Date: 1996-04-23T00:00:00+00:00	[thread overview]
Message-ID: <317D39D6.4F3@ee.ubc.ca> (raw)
In-Reply-To: 4lgtnk$jm9@rational.rational.com

Bob Kitzberger wrote:
> 
> 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.

<stuff deleted>

In fact, Ada 95's protected objects (like Posix..4a monitors/condition 
variables only better) can be implemented so that they they involve 
fewer lock/unlock operations, and fewer context switches than an 
equivalent semaphore-based implementation. In addition, if priority 
ceiling locking is used (also Posix.4a/Ada 95), lock/unlock operations 
do not have to use queueing which further improves performance.

---
* Greg Bond                         * Dept. of Electrical Eng.  
* email: bond@ee.ubc.ca             * Univ. of British Columbia      
* voice: (604) 822 0899             * 2356 Main Mall                 
* fax:   (604) 822 5949             * Vancouver, BC              
* web: http://www.ee.ubc.ca/~bond   * Canada, V6T 1Z4




      reply	other threads:[~1996-04-23  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 ` Tom Griest
1996-04-16  0:00   ` Pat Rogers
1996-04-16  0:00 ` Stephen M. Garriga
1996-04-17  0:00 ` Daryl Siddon
1996-04-18  0:00 ` Alan Brain
1996-04-22  0:00   ` Bob Kitzberger
1996-04-23  0:00     ` Greg Bond [this message]
replies disabled

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