From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c2dbf71192d8706b,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-08 12:29:32 PST Newsgroups: comp.lang.ada Path: sparky!uunet!gatech!howland.reston.ans.net!agate!linus!linus.mitre.org!linus!mbunix!eachus From: eachus@goldfinger.mitre.org (Robert I. Eachus) Subject: Re: semantics question about SELECT statement In-Reply-To: alabau@labri.greco-prog.fr's message of Fri, 5 Mar 1993 14:52:21 GMT Message-ID: Sender: news@linus.mitre.org (News Service) Nntp-Posting-Host: goldfinger.mitre.org Organization: The Mitre Corp., Bedford, MA. References: <1993Mar5.145221.23827@greco-prog.fr> Date: Mon, 8 Mar 1993 19:44:51 GMT Date: 1993-03-08T19:44:51+00:00 List-Id: 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...