[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: asynchronous i/o
--- ad <u2000005@giki.edu.pk> wrote:
> 1. What's the difference between i/o being done
> asynchronously within the
> kernel and external apps using aio thru some api.
> I've read this post
>
http://archive.lug.boulder.co.us/bymonth/2002.06/msg00500.html
> and it's a little confusing. From what I understand
> all i/o is routed thru the kernel, so if the kernel
> does it asynchronously so should any applications.
The i/o interface provided to user-mode programs
does not have to be the same as what the kernel uses
internally.
When the kernel initiates i/o on some device, it does
not wait for the operation to complete. Instead, it
gets notified asynchronously (through interrupts)
when the operation completes. The read/write system
calls do not provide similar semantics to user-mode
programs. Hence the need for a different API for
async i/o.
> 2. What kind of support would an application require
> for an aio implementation for network operations or
> sockets.
I believe it would be similar to supporting async i/o
on any other file: read and write operations should
be non-blocking and kernel should notify when the
operation is complete.
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/