Oracle Internals Notes

Kernelized Asynchronous I/O

For kernelized asynchronous I/O (KAIO) to raw devices and Quick I/O files, the kernel allocates an asynchronous I/O request data structure and calls an entry point in the device driver to set up the asynchronous I/O request. The device driver then queues the physical I/O operation and returns control to calling process. When the physical I/O operation has completed, the hardware generates an interrupt to a CPU. The CPU switches into interrupt service context and calls the device driver's interrupt service routine to update the asynchronous I/O request data structure and possibly to signal the calling process with SIGIO. If asynchronous notification with SIGIO is not implemented or enabled, the process must call aio_error() to poll for the completion of the request. The aio_return() call is then used to obtain and process the results of the I/O request.

This is called kernelized asynchronous I/O, because the kernel includes specific support for asynchronous I/O, whereas the threaded implementation of asynchronous I/O just uses the kernel's light-weight process functionality to simulate asynchronous I/O by performing multiple synchronous I/O requests in distinct threads (more). Kernelized asynchronous I/O is also called split phase asynchronous I/O because of its separation of the I/O request and completion phases.

The most important thing to note is that KAIO request completion occurs in interrupt service context and must therefore be fully implemented in the device driver's interrupt service routine. This is why kernelized asynchronous I/O is only available for raw I/O and Quick I/O, and only if the required drivers are present in the operating system kernel. Some operating systems also require additional configuration steps to enable KAIO. The following table details KAIO availability and requirements for some important operating systems.

Solaris KAIO is available for raw devices and Quick I/O files.
No special configuration is required.
HP-UX KAIO is available for raw devices and Quick I/O files.
The asynchdisk or asynchdsk driver must be included in the kernel.
The /dev/async device file must exist with major number 101.
The max_async_ports kernel parameter must be greater than
the sum of processes parameters in all instances,
plus an allowance of one more for each persistent background process.
The dba user group must have the MLOCK privilege in /etc/privgroup.
AIX KAIO is available for raw devices and virtual or hashed shared disks.
The state parameter in the smit aio menu must be set to available.
Tru64 Unix KAIO is available for raw devices.
No special configuration is required.
Irix KAIO is available for raw devices.
No special configuration is required.
Reliant Unix KAIO is available for raw devices.
The optional aio package must be added, and the kernel rebuilt.
The AIO_MAX parameter in /etc/conf/cf.d/mtune must be greater than
the sum of processes parameters in all instances,
plus an allowance of one more for each persistent background process.
Linux KAIO is not yet available (expected with 2.5).
Windows NT/2000 KAIO is not available.
... ...

If your operating system is not listed in the table above, and if you are aware of the details, please click on the feedback icon below and send us an email so that we can add it to the list.

Oracle uses kernelized asynchronous I/O automatically whenever asynchronous I/O is attempted against a database file for which KAIO is possible.


© Ixora Pty Ltd.   All rights reserved.
05-Apr-2002
Search   Questions   Feedback   Up   Home