User: Password:
|
|
Subscribe / Log in / New account

One at a time

One at a time

Posted Mar 8, 2004 20:23 UTC (Mon) by mwilck (subscriber, #1966)
In reply to: One at a time by corbet
Parent article: A retry-based AIO infrastructure

I figured that. Yet the term "asynchronous" suggests to me that the requests should be progressing independently - not the kind of serialized behavior that you describe. What if that current request is progressing slowly (think a floppy) and others in the queue never get worked on until it's completed?

My impression is that it should have been the other way around: instead of implementing AIO on top of buffered IO, asynchronous requests should be the basic IO primitive and all other IO should be implemented on top of that. I can't oversee what that'd imply for the page cache, though.


(Log in to post comments)

One at a time

Posted Mar 9, 2004 8:08 UTC (Tue) by larryr (guest, #4030) [Link]

I think the thread that is handling accessing a floppy is going to be asleep almost all the time, so there will be plenty of time for other threads to wake up, do some stuff, and either finish or go back to sleep themselves.

Larry

AIO as replacement for mutlithreading ?

Posted Mar 9, 2004 21:47 UTC (Tue) by mwilck (subscriber, #1966) [Link]

What are you referring to as a "thread"? An AIO request? How can other AIO requests "wake up, do some stuff" if the kernel is still handling the floppy request which blocks the single AIO entry for the process?

Guess I must read the code myself.

I may have put my concern in the wrong words though. One idea I have about AIO is that you can have an application behave like a multithreaded application with a singe thread. Instead of creating threads for certain IO tasks you just fire off AIO requests and they _proceed simultaneously_, as if they were driven by different threads. I wonder how that'd be possible with the serialized approach described here. Perhaps the whole notion is wrong, though?

AIO as replacement for mutlithreading ?

Posted Mar 11, 2004 17:34 UTC (Thu) by larryr (guest, #4030) [Link]

How can other AIO requests "wake up, do some stuff" if the kernel is still handling the floppy request which blocks the single AIO entry for the process?

Most of the (wall clock) time the kernel is handling the floppy request is going to be spent sleeping (waiting for the floppy device), and while that request is sleeping another request can proceed until it either completes or has to wait for a device (sleep).

Larry


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds