Contact Us Contact Us


  Software Depot
Electronic download
Frequently asked questions
Product details and specifications

POSIX AIO provides a mechanism to wait for the completion of multiple asynchronous I/O(AIO) requests through a system call, aio_reap(2). If aio_reap(2) has been called to reap the AIO requests, when there are no out standing requests or the out standing requests are less than what has been asked to reap,aio_reap(2) fails with E2BIG error. This behaviour of failing the aio_reap(2) causes a concern in some multi-threaded environment, where multiple calls to aio_reap(2) to reap the request is costlier compared to allowing a single aio_reap(2), reaping all the requested number of I/Os by waiting untill there are new AIO request queued to the process or till the timeout specified to aio_reap(2) expires. AioEnh delivers the POSIX AIO functionality wherein aio_reap(2) has been modified to wait for the out standing AIO requests to become equal to the specified number of AIO requests ,when the out standing AIO requests are less than the number of I/O requests that aio_reap() has been asked to reap.

What is in AioEnh 1.0 release?

POSIX AIO has been enhanced to have aio_reap(2) to wait for the arrival of new AIO requests when there are no out standing AIO requests on the system.

How to enable the new behaviour?

To use aio_reap(2), the reap mechanism must be initiated by making a light-weight polling call to aio_reap(2). This call must be made before calling any other AIO functions. To enable this new behaviour aio_reap(2) must be called in lightweight mode as shown in the below example:

int aio_init_val = 0xEAF1;

(void)aio_reap(NULL, 0, NULL, 0, &aio_init_val);

The magic number 0xEAF1 should be passed to the last argument of aio_reap(2) in lightweight polling mode. The new functionality is enabled per process, meaning which ever process initialises the reap mechanism as shown above, only that process will get the new functionality enabled. Once the new functionality is enabled it can not be disabled for that particular process instance.


With the new behaviour, aio_reap(2) will wait for the specified number of AIO requests to complete, this can cause potential starvation if there is a delay for the new requests to get started.

Additional product information
Product #: AioEnh
Version: 1.0
Software specification: B.11.31(Aio-Enh_v1_11iv3.depot)