comp.lang.ada
 help / color / mirror / Atom feed
From: Jean-Pierre Rosen <rosen@adalog.fr>
Subject: Re: protected type interrupts
Date: Fri, 25 Aug 2006 08:42:53 +0200
Date: 2006-08-25T08:42:53+02:00	[thread overview]
Message-ID: <i56mce.8k2.ln@hunter.axlog.fr> (raw)
In-Reply-To: <1156446985.794916.61470@74g2000cwt.googlegroups.com>

REH a �crit :

> I don't understand.  How can a procedure within a protected object
> modify data internal to the object in a thread-safe way without the
> potentially blocking effect of enforcing mutual exclusion?  If one task
> is "using" the object, and another calls one of the object's
> procedures, would the second task not be blocked until the first one
> exits the object?  
> 
The goal of the "potentially blocking" rule is to prevent *unbounded* 
blocking. Short blockings, such as those require to provide mutual 
exclusion, are OK, because thay are bounded.

Think of it this way: if it can be implemented on a multi-processor by a 
simple spin-lock, it is not potentially blocking. If it requires a 
queue, and being awaken depends on some non determinable condition, it 
is potentially blocking.
-- 
---------------------------------------------------------
            J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr



  parent reply	other threads:[~2006-08-25  6:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-24 14:47 protected type interrupts REH
2006-08-24 15:39 ` Jean-Pierre Rosen
2006-08-24 16:23   ` REH
2006-08-24 18:15     ` Adam Beneschan
2006-08-24 19:16       ` REH
2006-08-24 21:16         ` Adam Beneschan
2006-08-24 21:39           ` REH
2006-08-25  6:45           ` Jean-Pierre Rosen
2006-08-24 23:55         ` Jeffrey R. Carter
2006-08-25  6:42         ` Jean-Pierre Rosen [this message]
2006-08-24 23:47     ` Jeffrey R. Carter
2006-08-25  6:38     ` Jean-Pierre Rosen
2006-08-24 20:11 ` Simon Wright
2006-08-24 23:50 ` Jeffrey R. Carter
2006-08-25  6:48   ` Jean-Pierre Rosen
2006-08-25 11:33     ` REH
2006-08-25 17:27       ` Jean-Pierre Rosen
2006-08-25 20:57     ` Jeffrey R. Carter
2006-08-25 23:17       ` REH
2006-08-26  6:38         ` Jeffrey R. Carter
2006-08-26 13:16           ` REH
replies disabled

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