What is the status of POSIX asynchronous I/O (AIO)?

前端 未结 4 1256
無奈伤痛
無奈伤痛 2020-11-28 18:15

There are pages scattered around the web that describe POSIX AIO facilities in varying amounts of detail. None of them are terribly recent. It\'s not clear what, exactly,

4条回答
  •  囚心锁ツ
    2020-11-28 18:33

    There is aio_write - implemented in glibc; first call of the aio_read or aio_write function spawns a number of user mode threads, aio_write or aio_read post requests to that thread, the thread does pread/pwrite and when it is finished the answer is posted back to the blocked calling thread.

    Ther is also 'real' aio - supported by the kernel level (need libaio for that, see the io_submit call http://linux.die.net/man/2/io_submit ); also need O_DIRECT for that (also may not be supported by all file systems, but the major ones do support it)

    see here:

    http://lse.sourceforge.net/io/aio.html

    http://linux.die.net/man/2/io_submit

    Difference between POSIX AIO and libaio on Linux?

提交回复
热议问题