Subroutines Affected by Asynchronous I/O
The existing subroutines that are listed in this section are affected by AIO.
If the application closes a file, or calls the _exit or exec subroutines while it has some outstanding I/O requests, the requests are canceled. If they cannot be canceled, the application is blocked until the requests finish. When a process calls the fork subroutine, its AIO is not inherited by the child process.
One fundamental limitation in AIO is page hiding. When an unbuffered (raw) AIO is issued, the page that contains the user buffer is hidden during the actual I/O operation. This ensures cache consistency. However, the application can access the memory locations that fall within the same page as the user buffer. This can cause the application to block as a result of a page fault. To alleviate this, allocate page aligned buffers and do not touch the buffers until the I/O request using it finishes.