comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: Complexity of protected objects
Date: 2 Mar 2002 16:59:12 -0800
Date: 2002-03-03T00:59:12+00:00	[thread overview]
Message-ID: <5ee5b646.0203021659.2998c4f7@posting.google.com> (raw)
In-Reply-To: dale-1C20CF.10324101032002@its-aw-news.its.rmit.edu.au

Dale Stanbrough <dale@cs.rmit.edu.au> wrote in message news:<dale-1C20CF.10324101032002@its-aw-news.its.rmit.edu.au>...
> Jim Rogers wrote:
> Why is this? I see this as being a piece of programming 
> advice, - it's not a good idea to hold locks for a long 
> time - but is 
> there any more to it than that? Are there some other 
> consequences
> of scheduling than that?

It's amazing! The entire thread here is wandering off into
irrelevance based on this pervasive notion that potentially
blocking exactly matches the OS notion.

I wish the RM had used the term "grubnoxious" instead of
"potentially blocking" to avoid this confusion.

Here's the deal. If you are using the approach to implementing PT's
that completely avoids locks and
depends on ceiling priority, then you really must avoid
thread switches that could allow someone else to get into
the eggshell.

But if you are in fact using locks, there is no reason at
all to be worried about context switches. Yes, of course
the programmer will have to avoid deadlock in this case,
just as they would have to with tasks, but that's a different level of
concern entirely.

In fact GNAT works perfectly fine, as expected, if you
do blocking operations within PT's



  parent reply	other threads:[~2002-03-03  0:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-25 16:28 Complexity of protected objects tony gair
2002-02-25 16:45 ` Marin David Condic
2002-03-03  1:11   ` Robert Dewar
2002-03-03  4:13     ` Dale Stanbrough
2002-03-03 19:50       ` Robert Dewar
2002-02-25 17:35 ` Jim Rogers
2002-02-28 22:09   ` Nick Roberts
2002-02-28 23:32     ` Dale Stanbrough
2002-03-01  5:45       ` Jim Rogers
2002-03-03  0:59       ` Robert Dewar [this message]
2002-03-01 17:42     ` Jeffrey Carter
2002-03-03  1:06       ` Robert Dewar
2002-03-03  6:53         ` Jeffrey Carter
2002-03-03 19:36           ` Robert Dewar
2002-03-04 20:04             ` Jeffrey Carter
2002-03-03  0:54     ` Robert Dewar
2002-03-03  0:32   ` Robert Dewar
2002-02-25 22:01 ` Ted Dennison
2002-03-03  1:08   ` Robert Dewar
2002-03-04  9:33     ` Dmitry A. Kazakov
2002-03-04 16:44       ` Ted Dennison
replies disabled

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