file by adding ACLs with the setfacl command. For example, the following command allows a user named john read access to this file, even if john does not belong to the root group.
#setfacl
The ACL on file will look like:
#owner: root
#group: root user:: rw- user:john:r—
The mask field reflects the maximum permission that a user can get. Hence, as per the ACL, even though john is not part of the root group, john is allowed read access to the file /aclfile.
5.1.6Asynchronous I/O
Asynchronous I/O (AIO) enables even a single application thread to overlap I/O operations with other processing, by providing an interface for submitting one or more I/O requests in one system call (io_submit()) without waiting for completion, and a separate interface (io_getevents()) to reap completed I/O operations associated with a given completion group.
General operation of asynchronous I/O proceeds as follows:
•Process sets up asynchronous I/O context, for files opened with O_DIRECT, using io_setup system call.
•Process uses io_submit system call to submit a set of I/O operations.
•Process checks the completion of I/O operations using io_getevents.
•Process destroys the asynchronous I/O context using the io_destroy system call.
AIO uses the kernel bottom half mechanism of work queues to perform deferred work of AIO. io_setup sets up a work queue named aio, to which AIO work is submitted.
Some of the capabilities and features provided by AIO are:
•The ability to submit multiple I/O requests with a single system call.
•The ability to submit an I/O request without waiting for its completion and to overlap the request with other processing.
•Optimization of disk activity by the kernel through combining or reordering the individual requests of a batched I/O variety.
•Better CPU utilization and system throughput by eliminating extra threads and reducing context switches.
5.1.7I/O scheduler
The I/O scheduler in Linux forms the interface between the generic block layer and the
51