Check out my first novel, midnight's simulacra!

Asynchronous I/O: Difference between revisions

From dankwiki
No edit summary
No edit summary
Line 1: Line 1:
Defined in [http://opengroup.org/onlinepubs/009695399/basedefs/aio.h.html POSIX 1003.1b] (2004), and largely unchanged since then (though see Ulrich Drepper's [http://people.redhat.com/drepper/newni-slides.pdf 2006 proposal]), asynchronous I/O provides perhaps the most easily parallelized I/O model [[Fast UNIX Servers|on UNIX]].
Asynchronous I/O indicates operation completion not via function return, but a notification queued from device management (on UNIX, this usually means a signal queued from the relevant device driver). It provides perhaps the most easily parallelized I/O model [[Fast UNIX Servers|on UNIX]], especially following the [[Asynchronous I/O#POSIX|POSIX 1003.1b]] standardization effort.
 
==BSD==
The <tt>F_SETOWN</tt> and <tt>F_GETOWN</tt> suboperations of the <tt>fcntl(2)</tt> system call provided asynchronous I/O notifications via SIGIO and SIGURG. It only operated on pipes and terminals (and required <tt>O_ASYNC</tt> to be set via <tt>open(2)</tt> or <tt>fcntl(F_SETFL)</tt>), and has been obsoleted by POSIX 1003.1b. Linux supports the old BSD scheme and extends it via <tt>F_SETSIG</tt> and <tt>F_GETSIG</tt>.
 
==POSIX==
[http://opengroup.org/onlinepubs/009695399/basedefs/aio.h.html POSIX 1003.1b] (2004) introduced an asynchronous I/O API suitable for realtime applications, obsoleting and superseding the BSD and SystemV (STREAMS-based) implementations.


==See Also==
==See Also==
* "[http://lse.sourceforge.net/io/aio.html Kernel Asynchronous I/O (AIO) Support for Linux]"
* "[http://lse.sourceforge.net/io/aio.html Kernel Asynchronous I/O (AIO) Support for Linux]"
* [[Glibc]] asynchronous I/O [http://www.gnu.org/software/libc/manual/html_node/Asynchronous-I_002fO.html documentation]
* [[Glibc]] asynchronous I/O [http://www.gnu.org/software/libc/manual/html_node/Asynchronous-I_002fO.html documentation]

Revision as of 02:54, 21 October 2009

Asynchronous I/O indicates operation completion not via function return, but a notification queued from device management (on UNIX, this usually means a signal queued from the relevant device driver). It provides perhaps the most easily parallelized I/O model on UNIX, especially following the POSIX 1003.1b standardization effort.

BSD

The F_SETOWN and F_GETOWN suboperations of the fcntl(2) system call provided asynchronous I/O notifications via SIGIO and SIGURG. It only operated on pipes and terminals (and required O_ASYNC to be set via open(2) or fcntl(F_SETFL)), and has been obsoleted by POSIX 1003.1b. Linux supports the old BSD scheme and extends it via F_SETSIG and F_GETSIG.

POSIX

POSIX 1003.1b (2004) introduced an asynchronous I/O API suitable for realtime applications, obsoleting and superseding the BSD and SystemV (STREAMS-based) implementations.

See Also