Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Q: Asynch I/O and threads?
@ 1996-09-11  4:00 David Hinz
  1996-09-12  4:00 ` Bryan O'Sullivan
  1996-09-13  4:00 ` Steffen Ullrich
  0 siblings, 2 replies; 4+ messages in thread
From: David Hinz @ 1996-09-11  4:00 UTC (permalink / raw)



On Digital UNIX 3.2c can asynchronous I/O and threads be used together?
I've compiled the example that comes with the on the documentation CD
and it works fine in a non-threaded environment. But when I try to
modify a multi-threaded application to use aio it core dumps. Is there
any newgroups that deal with asynchronous I/O specifically? Does anyone
have any more examples (threaded or non-threaded) of useing the aio_*
functions?

Thanks for any help.
dave.

-- 
David Hinz --- MCI Telecommunications Corporation
E-mail: dhinz@dna406.dna.mci.com   Pager: 1-800-PAGE-MCI PIN: 172-3148
Phone: (303) 291-6108   VNET: 636-6108    Fax: (303) 291-6365



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Q: Asynch I/O and threads?
  1996-09-11  4:00 Q: Asynch I/O and threads? David Hinz
@ 1996-09-12  4:00 ` Bryan O'Sullivan
  1996-09-16  4:00   ` Dave Butenhof
  1996-09-13  4:00 ` Steffen Ullrich
  1 sibling, 1 reply; 4+ messages in thread
From: Bryan O'Sullivan @ 1996-09-12  4:00 UTC (permalink / raw)



d> On Digital UNIX 3.2c can asynchronous I/O and threads be used
d> together?

I would expect so, but I can't imagine why anyone would want to do
that.  Part of the motivation behind providing threads under Unix is
that it allows you not to use cruft like aio.

	<b

-- 
Let us pray:
What a Great System.                   bos@eng.sun.com
Please Do Not Crash.                bos@serpentine.com
^G^IP@P6                http://www.serpentine.com/~bos



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Q: Asynch I/O and threads?
  1996-09-11  4:00 Q: Asynch I/O and threads? David Hinz
  1996-09-12  4:00 ` Bryan O'Sullivan
@ 1996-09-13  4:00 ` Steffen Ullrich
  1 sibling, 0 replies; 4+ messages in thread
From: Steffen Ullrich @ 1996-09-13  4:00 UTC (permalink / raw)



In article <87d8zrf3cv.fsf@serpentine.com>,
	Bryan O'Sullivan <bos@serpentine.com> writes:
> d> On Digital UNIX 3.2c can asynchronous I/O and threads be used
> d> together?
> 
> I would expect so, but I can't imagine why anyone would want to do
> that.  Part of the motivation behind providing threads under Unix is
> that it allows you not to use cruft like aio.
> 

one reason is to reuse code which uses async IO (SIGIO) inside an multithreaded
environment. I do this right know and it works w/o problems.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Q: Asynch I/O and threads?
  1996-09-12  4:00 ` Bryan O'Sullivan
@ 1996-09-16  4:00   ` Dave Butenhof
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Butenhof @ 1996-09-16  4:00 UTC (permalink / raw)



Bryan O'Sullivan wrote:
> 
> David Hinz wrote:
> d> On Digital UNIX 3.2c can asynchronous I/O and threads be used
> d> together?
> 
> I would expect so, but I can't imagine why anyone would want to do
> that.  Part of the motivation behind providing threads under Unix is
> that it allows you not to use cruft like aio.
> 
>         <b

Actually, Bryan, I can think of one reason to use async I/O with
threads. Just as threads are cheaper than processes, async I/O is
cheaper (in theory) than threads. That is, each async I/O context
includes less information, and can be manipulated more efficiently.

On the other hand, this is relevant only when you're doing a LOT of
concurrent I/Os, and you have real reason to expect them to be able to
proceed in parallel, and those parallel async I/Os can be handled in
series by a substantially smaller number of threads. (Some high
performance database engines, for example, use async I/O to help spread
disk accesses across striped spindles -- it takes a lot of smarts to do
this well, though.)

Anyway, the CAN be used together, and if you're having trouble, Dave,
you'll need to give more specific information for anyone to help you.

/---[ Dave Butenhof ]-----------------------[ butenhof@zko.dec.com ]---\
| Digital Equipment Corporation           110 Spit Brook Rd ZKO2-3/Q18 |
| 603.881.2218, FAX 603.881.0120                  Nashua NH 03062-2698 |
\-----------------[ Better Living Through Concurrency ]----------------/



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1996-09-16  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-09-11  4:00 Q: Asynch I/O and threads? David Hinz
1996-09-12  4:00 ` Bryan O'Sullivan
1996-09-16  4:00   ` Dave Butenhof
1996-09-13  4:00 ` Steffen Ullrich

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