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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6ff6ac051491e437 X-Google-Attributes: gid103376,public From: progers@acm.org Subject: Re: Question about the need for requeue as described in Rationale Date: 1996/07/05 Message-ID: <4rk1tb$lit@uuneo.neosoft.com>#1/1 X-Deja-AN: 163909180 references: <31c8fdd4.5a455349@zesi.ruhr.de> <31DAD51F.40F1@csehp3.mdc.com> <4rjimv$glk@portal.gmu.edu> organization: NeoSoft, Inc. reply-to: progers@acm.org newsgroups: comp.lang.ada Date: 1996-07-05T00:00:00+00:00 List-Id: In <4rjimv$glk@portal.gmu.edu>, bsanden@site.gmu.edu (Bo I. Sanden) writes: >James A. Squire (m193884@CSEHP3.MDC.COM) wrote: >: I am trying to understand what problem Requeue is trying to solve and >: the above does not help me. I can see from the example given how it >: would be difficult to do the same thing in Ada83, but as I was trying to >: describe the Ada83 problem that raised the need for this, I found I >: couldn't come up with any good way of describing the problem. > >In my understanding, requeue is "needed" in Ada 95 primarily as part of >the effort to replace by protected units what was sometimes called >guardian tasks in Ada 83. Guardian tasks execute only while being >called by other task, and made a typical Ada 83 program contain more >tasks than the inherent concurrency of the problem would suggest. >(Guardian tasks where there to restrict concurrency by enforcing >synchronization of other tasks.) Requeue is needed to deal with the difficulties associated with "avoidance synchronization", which is the model used in Ada. The most illustrative example IMHO is the lack of expressive power of guard conditions in select statements: the conditions may not refer to the formal parameters of the accept statements they control. Thus you sometimes have to to do two rendezvous instead of one, and this leads to a number of other difficulties: the race conditions and potential for abort mentioned elsewhere. See A Problem With Ada and Resource Allocation, Ada Letters, vol. 3, no. 4 from 1984, or better yet, to hear how requeue works, Burns & Wellings' Concurrency In Ada, Cambridge University Press, 1995 pat --------------- Patrick Rogers progers@acm.org