comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: multiple delay alternative
Date: Tue, 6 Mar 2018 07:03:40 +0100
Date: 2018-03-06T07:03:40+01:00	[thread overview]
Message-ID: <p7lavs$vua$1@gioia.aioe.org> (raw)
In-Reply-To: 652df156-cec8-4417-ac0c-bed50c163a86@googlegroups.com

Le 06/03/2018 à 02:50, Mehdi Saada a écrit :
> Before that, one thing I can't get, even after asking other people: 
> for protected objects, in a protected procedure, when it's blocked,
> because a reading (protected function) or an entry is being served,
> are the calls to the procedure put on a queue as with entries ? 
> Someone said me the advantage of protected procedures was that you
> don't have to wait, but I read also they were exclusive with each
> others... damn.
This is kind of subtle.

From the formal (i.e. lawyer) POV:
Queues are not required by the language. On a multi-processor, one
processor could be actively looping on a lock until the lock is
released. OTOH, if you are using the Ceiling_Locking locking policy on a
mono-processor, the management of priorities is sufficient to guarantee
exclusive access without requiring queues.

The important point is that the time a task is blocked waiting on the
lock can be computed. Hence the ban on "potentially blocking operations"
in protected operations.

From the implementation POV:
Nothing prevents an implementation from using a conventional queue of
tasks waiting for the protection lock.

-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr

  parent reply	other threads:[~2018-03-06  6:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-04 18:22 multiple delay alternative Mehdi Saada
2018-03-05  0:21 ` Mehdi Saada
2018-03-05  4:08 ` Bojan Bozovic
2018-03-05 10:17   ` Robert Eachus
2018-03-05  8:15 ` Dmitry A. Kazakov
2018-03-05  9:23 ` AdaMagica
2018-03-05 10:32 ` Bojan Bozovic
2018-03-05 13:50 ` Mehdi Saada
2018-03-05 14:35   ` Dmitry A. Kazakov
2018-03-05 15:09     ` Mehdi Saada
2018-03-06 11:05       ` Dmitry A. Kazakov
2018-03-05 17:37   ` Jeffrey R. Carter
2018-03-05 23:28 ` Simon Wright
2018-03-06  0:11   ` Anh Vo
2018-03-06  1:50 ` Mehdi Saada
2018-03-06  6:00   ` Robert Eachus
2018-03-06  6:03   ` J-P. Rosen [this message]
2018-03-06 16:36   ` Jeffrey R. Carter
2018-03-06 10:31 ` Mehdi Saada
2018-03-06 11:18   ` Dmitry A. Kazakov
2018-03-06 13:43     ` Mehdi Saada
2018-03-06 15:17       ` Dmitry A. Kazakov
2018-03-06 20:06       ` Randy Brukardt
replies disabled

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