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: ffc1e,9425605c29366d79 X-Google-Attributes: gidffc1e,public X-Google-Thread: 103376,20fe5a249f5f6562 X-Google-Attributes: gid103376,public From: "Mike Silva" Subject: Re: multi reads, single write Date: 1999/12/16 Message-ID: #1/1 X-Deja-AN: 561671520 References: <3847B024.EC4FD04F@essex.ac.uk> <3854FCC0.D0127CD8@bbnplanet.com> <3858F8FA.CA9BD032@bbnplanet.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Complaints-To: news@wenet.net X-Trace: news.wenet.net 945377811 206.169.137.33 (Thu, 16 Dec 1999 12:56:51 PST) NNTP-Posting-Date: Thu, 16 Dec 1999 12:56:51 PST Newsgroups: comp.programming.threads,comp.lang.ada Date: 1999-12-16T00:00:00+00:00 List-Id: I've cross-posted this to comp.lang.ada because I'm interested in any insight they may have there. While an Ada task entry can easily do such bounded waiting (see e.g. http://www.adahome.com/Ammo/cpp2ada.html "7.2.4 delays"), it appears from my newbie reading on protected types that they do not allow this. Perhaps this is due to efficiency considerations regarding barrier evaluation (despite some comments here, the design of protected types was strongly constrained by efficiency considerations), and/or by the need of the protected functions and procedures to indicate a timeout condition, but that's all just me supposing... Anyway, I imagine it's easy to channel accesses to protected types through task entries which do bounded waiting, but I don't know what subtleties might arise. I hope the Ada experts can point out the best solution to the question. Mike Joe Seigh wrote in message <3858F8FA.CA9BD032@bbnplanet.com>... >> Example of "wait free" using protected type declaration: >> >> protected type Resource is >> entry Seize; >> procedure Release; >> private >> Free : Boolean := True; >> end Resource; >> >> protected body Resource is >> entry Seize when Free is >> begin >> Free := False; >> end Seize; >> >> procedure Release is >> begin >> Free:= True; >> end Release; >> end Resource; >> >> Very simple, isn't it ? >> > >I don't understand how this is "wait free". "wait free" is bounded waiting, no indefinite >waits allows. What guarantees that the barrier is set to True within some fixed amount >of time? > >Joe Seigh