comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <nick.roberts@acm.org>
Subject: Re: Deadlock resolution
Date: Wed, 28 Jul 2004 15:14:09 +0100
Date: 2004-07-28T15:14:09+01:00	[thread overview]
Message-ID: <opsbuptvw4p4pfvb@bram-2> (raw)
In-Reply-To: 2mnfg2Fpcd2uU1@uni-berlin.de

On Tue, 27 Jul 2004 18:52:11 +0200, Jano <notelacreas@porfavor.no> wrote:

> ...
> If I were extra paranoid about certain tasks and were to detect  
> deadlocks, as a first though I suppose I would use the ATC
> construct, ...

I think there is generally great value in using an ATC to provide
a timeout to a call to a service which is external (to the program
or module), since this helps to ensure that your program or module
is not stymied by something outside its control, as well as
protecting against 'big ring' deadlock.

I find that the gory details can be neatly hidden inside a
procedure, to which you pass -- in addition to other relevant
parameters -- the timeout value, which can have a convenient
default.

> Are queued entry calls abortable? I seem to remember something
> about that.

There are various rules and caveats. An entry call can be
cancelled if it is still waiting in the queue, but the body of an
accept statement is an 'abort deferred region', and cannot be
aborted as such. An ATC is not permitted within any abort deferred
region, which includes Initialize, Finalize, and Adjust. And so
on.

> I find the client (tasks)/server (monitors) architecture safe
> and convenient, if you can stick to it...

Indeed.

-- 
Thanks for your reply,
Nick Roberts



  reply	other threads:[~2004-07-28 14:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-26  3:25 Deadlock resolution Nick Roberts
2004-07-26  7:46 ` Mark Lorenzen
2004-07-27 15:31   ` Nick Roberts
2004-07-28  9:34     ` Mark Lorenzen
2004-07-28 13:53       ` Nick Roberts
2004-07-28 14:21         ` Dmitry A. Kazakov
2004-08-02 11:00     ` Ole-Hjalmar Kristensen
2004-07-26  7:48 ` Jano
2004-07-27 15:33   ` Nick Roberts
2004-07-27 16:52     ` Jano
2004-07-28 14:14       ` Nick Roberts [this message]
2004-07-29  1:04         ` Randy Brukardt
2004-07-26 14:05 ` Marc A. Criley
2004-07-27 15:50   ` Nick Roberts
2004-07-27 17:31     ` Marc A. Criley
2004-07-27 21:29       ` Robert I. Eachus
2004-07-28 14:29         ` Nick Roberts
2004-07-27 17:53 ` Martin Dowie
replies disabled

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