Check out my first novel, midnight's simulacra!

Asynchronous I/O

From dankwiki
Revision as of 02:54, 21 October 2009 by Dank (talk | contribs)

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