comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Protected Objects And Many Processors
Date: Fri, 21 Jan 2011 12:55:22 -0700
Date: 2011-01-21T12:55:22-07:00	[thread overview]
Message-ID: <ihcp5i$s5$1@tornado.tornevall.net> (raw)
In-Reply-To: <4d39cbde$0$6882$9b4e6d93@newsspool2.arcor-online.net>

On 01/21/2011 11:09 AM, Georg Bauhaus wrote:
>
> Are protected objects still the best choice on a computer
> that has many processors and/or cores?
>
> Will the program run just as well when written with only task
> objects if and when the number of available processors is
> sufficient, that is, C>  N?

I presume you refer to using tasks in place of the protected objects (perhaps 
what were called "passive tasks" back in the Ada-83 days).

There are 2 ways I can think of in which protected objects might be better than 
tasks when you have a processor for each task. Both relate to protected functions:

1. In theory, you can have multiple simultaneous calls to protected functions. 
I'm not sure there's any implementation that does this, but it is possible.

2. Protected functions can return indefinite types with actual values determined 
by the function; task entries are constrained to the size of objects provided by 
the caller.

Whether these are important considerations for a given application is a 
different matter.

-- 
Jeff Carter
"It's all right, Taggart. Just a man and a horse being hung out there."
Blazing Saddles
34



  parent reply	other threads:[~2011-01-21 19:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21 18:09 Protected Objects And Many Processors Georg Bauhaus
2011-01-21 19:31 ` Yannick Duchêne (Hibou57)
2011-01-21 20:35   ` Dmitry A. Kazakov
2011-01-21 21:48     ` Yannick Duchêne (Hibou57)
2011-01-21 22:32     ` Yannick Duchêne (Hibou57)
2011-01-24 11:29       ` comp.lang.php
2011-01-24 14:53         ` Dmitry A. Kazakov
2011-01-21 19:55 ` Jeffrey Carter [this message]
2011-01-21 20:31   ` Yannick Duchêne (Hibou57)
2011-01-22  5:16     ` Randy Brukardt
2011-02-06 20:04       ` Yannick Duchêne (Hibou57)
2011-02-06  1:22 ` Gene
replies disabled

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