Summary of threading for experienced non-Python programmers?
Donn Cave
donn at u.washington.edu
Mon Mar 31 12:18:06 EDT 2008
In article <7xr6dta93p.fsf at ruckus.brouhaha.com>,
Paul Rubin <http://phr.cx@NOSPAM.invalid> wrote:
> Select blocks until the data is ready, while with AIO the i/o happens
> completely in the background and your process gets an interrupt when
> the i/o completes. Also, with select based i/o, usually the kernel
> reads data from the external device into a system buffer, and then you
> do a read system call that copies the data from the system buffer to
> your buffer. AIO can be set up so the i/o happens directly into your
> buffer, avoiding the extra copying. You can also initiate a bunch of
> different i/o events with a single system call, avoiding some context
> switches.
>
> http://www.ibm.com/developerworks/linux/library/l-async/
>
> describes select as "asynchronous, blocking" as opposed to AIO which
> is asynchronous and nonblocking. Other descriptions I've seen reserve
> "asynchronous i/o" for AIO-like schemes. It's just a terminological
> thing.
kqueue(2) on MacOS X mentions an EVFILT_AIO option. It isn't
supported on that platform, but maybe that's a vestige of some
other platform that does support "asynchronous, blocking" with
aio -- as VAX/VMS did (and presumably still does), with event
flags.
Donn Cave, donn at u.washington.edu
More information about the Python-list
mailing list