UNIX does *not* fully support asynchronous I/O

Sean Fagan seanf at sco.COM
Tue Aug 28 12:34:45 AEST 1990


In article <11576:Aug2503:18:3790 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
>Say a program computes some numbers. Computes them optimally, in fact,
>leaving them in an array. Now it wants to write the array to disk.
>
>If the operating system weren't in the way, the program would simply
>call upon the disk device to copy the data---through DMA, of course---to
>the disk.

Uhm, *where* is it going to put it?

Or does the user program just automagically know which sectors on the disk
are free to write in, and, of course, it's going to up date the inode
information properly, and all directory information.

Having worked on an OS that does to asynchronous I/O quite well (NOS, for
those who don't read comp.arch 8-)), it's a bit different from what brnstnd
says.

Under NOS, you tell the OS you want to write some data to disk (or tape, or
whatnot); you set a bit in the instruction words (each request needs a block
of data describing the file and data) on whether you wish to return
immediately or not.  You then write the "syscall number" into word 0, and
one of the I/O processors will pick it up, and act accordingly.

Note that unix machines generally don't have the I/O processors capable of
this much intelligence.  (Sorry, an 8259 won't cut it.)

-- 
Sean Eric Fagan  | "let's face it, finding yourself dead is one 
seanf at sco.COM    |   of life's more difficult moments."
uunet!sco!seanf  |   -- Mark Leeper, reviewing _Ghost_
(408) 458-1422   | Any opinions expressed are my own, not my employers'.



More information about the Comp.unix.wizards mailing list