aio_read/write versus O_NONBLOCK (linux context) - Linux

This is a discussion on aio_read/write versus O_NONBLOCK (linux context) - Linux ; Over in comp.unix.programmer is a thread "aio_read/write versus O_NONBLOCK". I want to write a small piece of code that will do overlapped I/O as fast as possible to populate a filesystem. At the time this code runs, no libraries are ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: aio_read/write versus O_NONBLOCK (linux context)

  1. aio_read/write versus O_NONBLOCK (linux context)

    Over in comp.unix.programmer is a thread "aio_read/write versus O_NONBLOCK".

    I want to write a small piece of code that will do overlapped I/O as fast as
    possible to populate a filesystem. At the time this code runs, no libraries
    are available (because they are in the filesystem being populated).

    It appears that aio_read/write are not implemented as system calls. These
    appear to be library implementations that presumably call some other system
    call. But since O_NONBLOCK does not work on files, it can't be using that.
    Anyone know what it is that aio_read/write could be using to request such
    I/O from Linux.

    --
    |WARNING: Due to extreme spam, googlegroups.com is blocked. Due to ignorance |
    | by the abuse department, bellsouth.net is blocked. If you post to |
    | Usenet from these places, find another Usenet provider ASAP. |
    | Phil Howard KA9WGN (email for humans: first name in lower case at ipal.net) |

  2. Re: aio_read/write versus O_NONBLOCK (linux context)

    On May 24, 4:45*pm, phil-news-nos...@ipal.net wrote:

    > It appears that aio_read/write are not implemented as system calls. *These
    > appear to be library implementations that presumably call some other system
    > call. *But since O_NONBLOCK does not work on files, it can't be using that.
    > Anyone know what it is that aio_read/write could be using to request such
    > I/O from Linux.


    Threads.

    DS

  3. Re: aio_read/write versus O_NONBLOCK (linux context)

    On Mon, 26 May 2008 01:26:03 -0700 (PDT) David Schwartz wrote:

    | On May 24, 4:45?pm, phil-news-nos...@ipal.net wrote:
    |
    |> It appears that aio_read/write are not implemented as system calls. ?These
    |> appear to be library implementations that presumably call some other system
    |> call. ?But since O_NONBLOCK does not work on files, it can't be using that.
    |> Anyone know what it is that aio_read/write could be using to request such
    |> I/O from Linux.
    |
    | Threads.

    Do you have a specific suggestion, considering that no libraries are available?
    Are you suggesting clone(2)?

    --
    |WARNING: Due to extreme spam, googlegroups.com is blocked. Due to ignorance |
    | by the abuse department, bellsouth.net is blocked. If you post to |
    | Usenet from these places, find another Usenet provider ASAP. |
    | Phil Howard KA9WGN (email for humans: first name in lower case at ipal.net) |

  4. Re: aio_read/write versus O_NONBLOCK (linux context)

    On May 27, 3:28*am, phil-news-nos...@ipal.net wrote:

    > Do you have a specific suggestion, considering that no libraries are available?
    > Are you suggesting clone(2)?


    If no libraries are available, you need to statically link. But it
    sounds like you are trying to use general-purpose programming
    techniques to create a program that runs in a special environment.
    That's sometimes impossible. You can't write a bootloader that uses
    asynchronous I/O either.

    What happens what you statically link?

    DS

  5. Re: aio_read/write versus O_NONBLOCK (linux context)

    On Tue, 27 May 2008 05:13:40 -0700 (PDT) David Schwartz wrote:
    | On May 27, 3:28?am, phil-news-nos...@ipal.net wrote:
    |
    |> Do you have a specific suggestion, considering that no libraries are available?
    |> Are you suggesting clone(2)?
    |
    | If no libraries are available, you need to statically link. But it
    | sounds like you are trying to use general-purpose programming
    | techniques to create a program that runs in a special environment.
    | That's sometimes impossible. You can't write a bootloader that uses
    | asynchronous I/O either.
    |
    | What happens what you statically link?

    That depends on whether or not I call functions that are in klibc. I do know
    that the pthread calls are not there. I can add the clone() call if I figure
    out how to create the new context for each thread.

    --
    |WARNING: Due to extreme spam, googlegroups.com is blocked. Due to ignorance |
    | by the abuse department, bellsouth.net is blocked. If you post to |
    | Usenet from these places, find another Usenet provider ASAP. |
    | Phil Howard KA9WGN (email for humans: first name in lower case at ipal.net) |

+ Reply to Thread