comp.lang.ada
 help / color / mirror / Atom feed
From: "Mike Silva" <mjsilva@jps.net>
Subject: Re: multi reads, single write
Date: 1999/12/16
Date: 1999-12-16T00:00:00+00:00	[thread overview]
Message-ID: <nmc64.340$tb.41094@news.wenet.net> (raw)
In-Reply-To: 3858F8FA.CA9BD032@bbnplanet.com

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






  parent reply	other threads:[~1999-12-16  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3847B024.EC4FD04F@essex.ac.uk>
     [not found] ` <s55ijfn65347@corp.supernews.com>
     [not found]   ` <S8D44.2440$Fg4.55139@cac1.rdr.news.psi.ca>
     [not found]     ` <s57jva4653132@corp.supernews.com>
     [not found]       ` <It254.26$0M4.4114@cac1.rdr.news.psi.ca>
     [not found]         ` <s59nkfe15396@corp.supernews.com>
     [not found]           ` <833uh9$e4p$1@pravda.ucr.edu>
1999-12-14  0:00             ` multi reads, single write Vladimir Olensky
1999-12-14  0:00               ` Tom Payne
     [not found]           ` <slrn85ahtm.709.kaz@ashi.FootPrints.net>
     [not found]             ` <s5at141453168@corp.supernews.com>
     [not found]               ` <slrn85b2bs.b2j.kaz@ashi.FootPrints.net>
1999-12-15  0:00                 ` Vladimir Olensky
     [not found]           ` <3854FCC0.D0127CD8@bbnplanet.com>
     [not found]             ` <s5d9d16j5397@corp.supernews.com>
     [not found]               ` <3858F8FA.CA9BD032@bbnplanet.com>
1999-12-16  0:00                 ` Mike Silva [this message]
1999-12-16  0:00                   ` Laurent Guerby
1999-12-16  0:00                     ` Mike Silva
1999-12-12  0:00 Vladimir Olensky
1999-12-14  0:00 ` Samuel T. Harris
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox