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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fc232b1f37897ed0 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: D.10 Date: 1999/04/13 Message-ID: #1/1 X-Deja-AN: 465874334 References: <7eu6ud$8lc$1@bgtnsc03.worldnet.att.net> <7evbm6$oto$1@nnrp1.dejanews.com> NNTP-Posting-Date: Tue, 13 Apr 1999 06:16:43 PDT Newsgroups: comp.lang.ada Date: 1999-04-13T00:00:00+00:00 List-Id: Robert Dewar writes: > In article , > Matthew Heaney wrote: > > The RM is ambiguous. It doesn't say specifically that > > the suspension object can be shared this way (ie that > > Suspend_Until_True is atomic wrt other calls to > > Suspend_Until_True), but it doesn't say it can't be. > > I must say I don't see any ambiguity in the RM here, but > I have trouble with your question because the terminology > is vague ("A is atomic wrt B" does not have a clear meaning > in this context). I was trying to phrase my question using the same terms as the RM, but perhaps I goofed. RM95 D.10 (7) reads "The operations Set_True and Set_False are atomic with respect to each other and with respect to Suspend_Until_True..." My question is, why doesn't the RM also say "The operation Suspend_Until_True is atomic with respect to Suspend_Until_True"? > > I would like to know the specific intent of the language > > designers, and whether or not the algorithm in B&W is in > > fact legal. > > You are using legal again in some peculiar sense (in Ada > it means that something satisfies static semantic and > syntax requirements). Agreed; I used the term "legal" incorrectly. > I think you will get a clearer answer to your question if > you produce a small example, and ask a question about it > at the proper level of semantic description. I included an example in my original post. Here is the text from Concurrency In Ada (by Burns and Wellings), section 12.3.1: (start of excerpt) Using a Suspension_Object, it is possible to program mutual exclusion between two tasks by simply encapsulating their critical sections with the following: Mutex : Suspension_Object; ... Set_True (Mutex); ... Suspend_Until_True (Mutex); -- critical section Set_True (Mutex); Suspension objects can also be used inside protected objects to implement condition synchronization. (end of excerpt) My question is, Is this is a correct program, or isn't it? Does this program have a defined meaning, or doesn't it? Is the statement "it is possible to program mutual exclusion between two tasks by simply encapsulating their critical sections with the following..." true, or isn't it? > If I write X, then is Y true, where Y is stated in terms with which we > are familiar, preferably those in the RM! The phrase "atomic with respect to" came out of the RM, which I why I used it. Incorrectly, I guess.