Check out my first novel, midnight's simulacra!

Asynchronous I/O: Difference between revisions

From dankwiki
No edit summary
No edit summary
 
Line 2: Line 2:


==BSD==
==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>.
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 APIs|Linux]] supports the old BSD scheme and extends it via <tt>F_SETSIG</tt> and <tt>F_GETSIG</tt>.


==POSIX==
==POSIX==

Latest 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