comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: an error in Re: tasking
Date: 1998/10/16
Date: 1998-10-16T00:00:00+00:00	[thread overview]
Message-ID: <F0xC1K.BzL.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: slrn71osmk.ork.franke@pax01f.mipool.uni-jena.de

Frank Ecke (franke@minet.uni-jena.de) wrote:
: ...
: Very well, but why is a rendezvous not an abort-deferring operation when the
: server is aborted?  Or, to be more precise, why is the rendezvous treated
: differently in the case of aborting a task that executes an accept statement
: and in the case of aborting the triggering entry call in the ATC statement?

:    After all, it is the server that manipulates the global data structures and
: aborting it creates the mess.

The rendezvous model is that a server doesn't manipulate global data
structures.  They manipulate their *own* data structures.
In other words, the server is "global," the data structures are
internal to the server.

So if you abort the server, then there is nothing to protect,
since the data structures are internal to the server.

Aborting this kind of server task is analogous to doing an
unchecked deallocation on an object.  You had better do it
only when you have no further interest in the object.

There are other interesting models, where there are multiple
server tasks, all sharing a common data structure.  In Ada 83,
the only way to do this would have been to have yet another task,
which all the server tasks communicated with, which managed this
shared common data structure.  In Ada 95, this shared common
data structure could be a protected object.

In either model, the actual manipulation of the shared common
data structure by the multiple servers would be abort-deferred,
because it would be implemented by entry (or protected) *calls* 
on the shared common data object/task, not on *accepts.*

In almost any conceivable use of rendezvous, the accept statement
is the time when the acceptor updates its own *internal* data
structures, and communicates with the caller.  It is not the
time when it manipulates some shared global data structure
(unless there is a nested entry/protected call inside the accept statement,
which again would be abort-deferred).

: I hope someone can shed some light on these issues.

See above.

: Frank

: --
: Frank Ecke <franke@minet.uni-jena.de>

--
-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Burlington, MA  USA
An AverStar Company




  reply	other threads:[~1998-10-16  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-07  0:00 tasking grave
1998-10-07  0:00 ` an error in tasking grave
1998-10-07  0:00   ` Frank Ecke
1998-10-08  0:00     ` Frank Ecke
1998-10-16  0:00       ` Tucker Taft [this message]
1998-10-19  0:00         ` Frank Ecke
1998-10-16  0:00       ` Robert A Duff
replies disabled

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