Sunday, August 15, 2010

Different Type of I/Os generated by IO Tools

Block I/O:
=========
- Initiated through native device files /dev/sd*.
- I/O transfers in fixed-size blocks
- write I/O exchange consists of transferring data blocks from the address space of the calling process to the kernel’s buffer cache, and then to the disk device.
- a read I/O exchange consists of transferring data blocks from the disk device to the kernel’s buffer cache, and then to the address space of the calling process.
- type of I/O is primarily used to support file systems where frequently accessed data can remain resident in kernel buffers, eliminating the need to repeatedly access the disk device and where I/O can be queued in the buffers until a threshold is reached before a disk device transaction is performed, optimizing efficiency.

RAW I/O :
=========
- initiated through special raw device files.
- I/O transfers in fixed-sized blocks.
- bypasses the kernel’s buffer cache so data is exchanged directly to and from the address space of the calling process, reducing the amount of required system bandwidth and improving I/O throughput
- type of I/O is primarily used to support database operations where the size of transactions tends to be small and the performance throughput is more critical.

Scatter-Gather I/O or Character I/O:
===========================
- initiated through special sg devices files /dev/sg* (or pass through driver).
-supports I/O of variable-sized blocks.
- provides direct access (i.e. pass-through) to SCSI devices, allowing the calling process to send direct SCSI commands to various devices including hard disks, CD-ROMs, and CD burners and to receive direct responses to the those commands.
- type of I/O is primarily used to perform low-level operations on SCSI devices that are not possible with the sd, st device drivers.

ASYNCHRONOUS I/O (or AIO):
========================= ====
- initated through special raw device files /dev/raw* using the LIBAIO library
- supports I/O of fixed-size blocks.
- Once the calling process issues the I/O request and the request is queued to the destination device, it immediately regains control of execution, allowing it to issue additional subsequent requests. The completion of an I/O request can be signaled to the calling process or the calling process can periodically poll the status of its I/O request.
- type of I/O is primarily used for high speed applications such as computation-intensive processes

No comments:

Post a Comment