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:54:33 -0800
Date: 2002-03-03T00:54:33+00:00	[thread overview]
Message-ID: <5ee5b646.0203021654.223591d8@posting.google.com> (raw)
In-Reply-To: 3c7e7c60.8192226@news.cis.dfn.de

nickroberts@ukf.net (Nick Roberts) wrote in message news:<3c7e7c60.8192226@news.cis.dfn.de>...
> On Mon, 25 Feb 2002 17:35:45 GMT, Jim Rogers

> It's perhaps a little sweeping to say "I/O is always 
> potentially blocking". There may be certain rare cases 
> where this is not so. But it will certainly
> always be so for reading or writing files, in practice.

Again this is wrong, and is based on the very common misunderstanding
that the technical term "potentially
blocking" corresponds to the OS/notion of the current
task being blocked. It does not!

The point is that *for a very particular kind of implementation
approach*, you will want to make this
correspondence, so in this environment (typically a
low level implementation on a monoprocessor), you will
want to make the correspondence, and the provision in the
RM allows you to do so.

But in more typical environments, e.g. working on top of
an operating system, or real time executive, there is absolutely no
requirement to restrict what can be done
in protected subprograms, and in practice may implementations do not
do so.


> Consider, for example, virtual memory. Depending on the 
> peculiarities of the Ada implementation and the target 
> execution environment, it may be that the execution of a 
> protected subprogram could cause a virtual memory 'page 
> fault' at any point in its execution. Such page faults 
> will typically cause I/O activity to occur (to swap a 
> page in, swap a page out, allocate a page on secondary 
> storage, or whatever). But I/O is 'potentially blocking'.

Now the full scale of the confusion hits. Of *COURSE* it
is the case that a memory read is NOT potentially blocking
in the RM sense, even if in practice in some operating
systems it might cause a context switch.


> Agreed.
> 
> Tony Gair wrote:
> >>(is this an oxymoron?).
> 
> Well, I admire the shapeless solidity of the question.
> 

Now there is a *true* oxymoron, very nice, quite poetic :-)



  parent reply	other threads:[~2002-03-03  0:54 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
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 [this message]
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