* [TUHS] Synchronous vs Asynchronous IO in Unix
@ 2015-09-20 12:39 Noel Chiappa
2015-09-20 14:32 ` Larry McVoy
0 siblings, 1 reply; 4+ messages in thread
From: Noel Chiappa @ 2015-09-20 12:39 UTC (permalink / raw)
> From: Peter Jeremy <peter at rulingia.com>
> Why were the original read(2) and write(2) system calls written to
> offer synchronous I/O only?
A very interesting question (to me, particularly, see below). I don't think
any of the Unix papers answer this question?
> It's relatively easy to create synchronous I/O functions given
> asynchronous I/O primitives but it's impossible to do the opposite.
Indeed, and I've seen operating systems (e.g. a real-time PDP-11 OS I worked
with a lot called MOS) that did that.
I actually did add asynchronous I/O to V6 UNIX, for use with very early
Internet networking software being done at MIT (in a user process). Actually,
it wasn't just asynchronous, it was _raw_ asynchronous I/O! (The networking
device was DMA, and the s/w did DMA directly into the user process' memory.)
The code also allowed more than one outstanding I/O request, too. (So the
input could be re-enabled on the device ASAP, without having to wake up a
process, have it run, do a new read call, etc.)
We didn't redo the whole Unix I/O system, to support/use asyn I/O throughout,
though; I just kind of warted it onto the side. (IIRC, it notified the user
process via a signal that the I/O had completed; the user software then had
to do an sgtty() call to get the transfer status, size, etc.)
Anyway, back to the original topic: I don't want to speculate (although I
could :-); perhaps someone who was around 'back then' can offer some insight?
If not, time for speculation! :-)
Noel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [TUHS] Synchronous vs Asynchronous IO in Unix
2015-09-20 12:39 [TUHS] Synchronous vs Asynchronous IO in Unix Noel Chiappa
@ 2015-09-20 14:32 ` Larry McVoy
2015-09-20 14:41 ` Larry McVoy
0 siblings, 1 reply; 4+ messages in thread
From: Larry McVoy @ 2015-09-20 14:32 UTC (permalink / raw)
On Sun, Sep 20, 2015 at 08:39:33AM -0400, Noel Chiappa wrote:
> Anyway, back to the original topic: I don't want to speculate (although I
> could :-); perhaps someone who was around 'back then' can offer some insight?
> If not, time for speculation! :-)
I don't have the answer but I noodled around with one quite a while ago:
http://www.mcvoy.com/lm/p/bitmover/lm/papers/splice.pdf
^ permalink raw reply [flat|nested] 4+ messages in thread
* [TUHS] Synchronous vs Asynchronous IO in Unix
2015-09-20 14:32 ` Larry McVoy
@ 2015-09-20 14:41 ` Larry McVoy
0 siblings, 0 replies; 4+ messages in thread
From: Larry McVoy @ 2015-09-20 14:41 UTC (permalink / raw)
On Sun, Sep 20, 2015 at 07:32:22AM -0700, Larry McVoy wrote:
> On Sun, Sep 20, 2015 at 08:39:33AM -0400, Noel Chiappa wrote:
> > Anyway, back to the original topic: I don't want to speculate (although I
> > could :-); perhaps someone who was around 'back then' can offer some insight?
> > If not, time for speculation! :-)
>
> I don't have the answer but I noodled around with one quite a while ago:
>
> http://www.mcvoy.com/lm/p/bitmover/lm/papers/splice.pdf
Whoops, wrng url, try this:
http://www.mcvoy.com/lm/bitmover/lm/papers/splice.pdf
Thanks to Charles Anthony for pointing that out to me.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [TUHS] Synchronous vs Asynchronous IO in Unix
@ 2015-09-20 4:38 Peter Jeremy
0 siblings, 0 replies; 4+ messages in thread
From: Peter Jeremy @ 2015-09-20 4:38 UTC (permalink / raw)
Why were the original read(2) and write(2) system calls written to offer
synchronous I/O only? It's relatively easy to create synchronous I/O
functions given asynchronous I/O primitives but it's impossible to do the
opposite.
Multics (at least) supported asynchronous I/O so the concept wasn't novel.
And any multi-tasking kernel has to support asynchronous I/O internally so
suitable code exists in the kernel.
--
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 949 bytes
Desc: not available
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20150920/ac6337df/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-20 14:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-20 12:39 [TUHS] Synchronous vs Asynchronous IO in Unix Noel Chiappa
2015-09-20 14:32 ` Larry McVoy
2015-09-20 14:41 ` Larry McVoy
-- strict thread matches above, loose matches on Subject: below --
2015-09-20 4:38 Peter Jeremy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).