comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: Streams and Concurrency
Date: 1998/12/31
Date: 1998-12-31T00:00:00+00:00	[thread overview]
Message-ID: <76g0nu$nsq$1@nnrp1.dejanews.com> (raw)
In-Reply-To: EACHUS.98Dec30172549@spectre.mitre.org

In article <EACHUS.98Dec30172549@spectre.mitre.org>,
  eachus@spectre.mitre.org (Robert I. Eachus) wrote:
> In article <F4sFr8.HHG.0.-s@inmet.camb.inmet.com> stt@houdini.camb.inmet.com
(Tucker Taft) writes:
>
>  > Furthermore, to support non-blocking read, you would need to add some
>  > kind of marker into the stream itself, I suspect, to be placed between
>  > "top-level" objects in the stream.  Then, when you call the non-blocking

>     Since the non-blocking read would have to do read ahead to find
> the marker, the marker doesn't really add anything.  So you really
> only need two sets of entries, one which does blocking read and
> writes, and one set which is non-blocking.  HOWEVER, the routines
> underlying the Read operations for interprocessor communication and
> I/O streams will have to be defined in terms of Stream_Elements,
> because you will have to not only do read ahead, but you will have to
> save the read ahead material in another (in memory) stream.

Ahhh. I had thought of that approach. I discarded it because I'm talking
real-time processes here. I don't have time to go copying large chuncks of
data around in the context of the real-time process. It does solve the
problem of handling objects w/ limited private fields, though.

>     Note that this is an somewhat special pattern.  It is only of
> interest in the presence of tasking and either multiple processors or
> the like.  And while it can easily be written in portable Ada 95, it
> is one where low-level implementation support can significantly
> improve performance.

"Special" perhaps, but not all that odd. It can occur in *any* tasking
program. In my 10 years of Ada use I've only worked on two programs that had
no tasks. It doesn't take a multiprocessor to cause a task switch in the
middle of a non-blocking operation. If you have tasks with different
priorites it can happen. If your scheduling policy supports any kind of time
slicing it can happen. Plus if the stream's Write procedure performs any I/O,
its possible that a 'Write itself is a blocking operation.


--
T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  parent reply	other threads:[~1998-12-31  0:00 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-30  0:00 Streams and Concurrency James S. Rogers
1998-12-29  0:00 ` David Botton
1998-12-30  0:00   ` James S. Rogers
1998-12-30  0:00     ` dennison
1998-12-30  0:00       ` James S. Rogers
1999-01-04  0:00       ` Robert I. Eachus
1998-12-31  0:00     ` Jean-Pierre Rosen
1998-12-31  0:00       ` dewar
1998-12-31  0:00         ` Ada-G, was " Tom Moran
1999-01-01  0:00           ` dewar
1999-01-01  0:00             ` Larry Kilgallen
1999-01-01  0:00           ` Brian Rogoff
1999-01-04  0:00             ` Robert I. Eachus
1999-01-08  0:00               ` Mats Weber
1999-01-08  0:00                 ` Robert I. Eachus
1999-01-08  0:00         ` Mats Weber
1999-01-08  0:00           ` Tucker Taft
1998-12-31  0:00       ` dewar
1998-12-31  0:00         ` dennison
1999-01-04  0:00         ` Jean-Pierre Rosen
1999-01-04  0:00           ` robert_dewar
1998-12-30  0:00   ` dennison
1998-12-30  0:00     ` Tucker Taft
1998-12-30  0:00       ` dennison
1998-12-31  0:00         ` robert_dewar
1998-12-30  0:00       ` Robert I. Eachus
1998-12-30  0:00         ` Tucker Taft
1998-12-31  0:00         ` dennison [this message]
1998-12-31  0:00           ` robert_dewar
1998-12-31  0:00             ` dennison
1999-01-01  0:00               ` robert_dewar
1999-01-04  0:00           ` Robert I. Eachus
1998-12-30  0:00 ` dennison
1998-12-30  0:00   ` Robert I. Eachus
1999-01-11  0:00   ` Bulk synchronous model for IO (was Re: Streams and Concurrency) Kevin Rigotti
replies disabled

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