comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@goldfinger.mitre.org (Robert I. Eachus)
Subject: Re: semantics question about SELECT statement
Date: Mon, 8 Mar 1993 19:44:51 GMT
Date: 1993-03-08T19:44:51+00:00	[thread overview]
Message-ID: <EACHUS.93Mar8144451@goldfinger.mitre.org> (raw)
In-Reply-To: alabau@labri.greco-prog.fr's message of Fri, 5 Mar 1993 14:52:21 GMT

In article <1993Mar5.145221.23827@greco-prog.fr> alabau@labri.greco-prog.fr (Miguel ALABAU) writes:

  > From the Reference Manual, it seems to me that the clients **in that
  > case** are serviced in an arbitrary order (because the guards are not
  > reevaluated). 

  > It seems to me that the example below is OK only if the rendez-vous
  > are serviced in the textual order, i.e. the callers on the entry
  > REQUEST(URGENT) are serviced before the callers on the entry
  > REQUEST(MEDIUM), and so on, even when all the guards are opened and
  > several rendez-vous are possible on different entries.

  > Am I right, or am I missing something ?

    You are missing something.  What will happen is that one or the
other rendezvous attempt will occur first and that rendezvous will
immediately occur.  Even in a "true" multiprocessor environment there
will be some hardware mechanism used to serialize two attempts to
rendezvous with a single task, so in effect the hardware will
guarentee the rendezvous attempts do not occur simultaneously.

   Also, since the rendezvous occurs at the higher of the two
priorities of the tasks involved and one of those two tasks must be
running when it becomes possible to complete the rendezvous, the
rendezvous can always be completed immediately.  This is a very subtle
point, but is crucial to understanding the Ada tasking model--the
rendezvous always IMMEDIATELY follows the arrival of the second of the
two parties at the rendezvous.  So there are complex models for
determining which task should be accepted when the called task is not
the first to arrive, but when things happen in the other order only
one rendezvous is possible.
--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...



      parent reply	other threads:[~1993-03-08 19:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-03-05 14:52 semantics question about SELECT statement cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!news2
1993-03-07 21:08 ` semantics question about SELECT statement (typos fixed) Alex Blakemore
1993-03-08 19:44 ` Robert I. Eachus [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