1. Field of the Invention
The invention disclosed and claimed herein pertains to a method and apparatus for optimizing an input/output (I/O) operation of an operating system. More particularly, the invention pertains to a method and apparatus of the above type, wherein optimization is achieved by using the identities of a specific file and program, or program component, which are related to or associated with the I/O operation.
2. Description of the Related Art
Application programs running on a computing platform often need to do many file I/O operations, such as writing data to a related file system in a disk storage or the like, and reading data from the file system. Whether or not data is read from the file system, nearly all application programs must write data to a file of the file system at some time. For example, applications generally need to log respective events to a file on the disk. This typically involves APIs of the file system.
While file system APIs are not the same in all program languages, it is generally true that all APIs hand over read and write requests to the underlying operating system. The operating system then carries out I/O operations that are respectively associated with or specified by the requests. More particularly, if an application program calls or sends an I/O request such as a write request to a given API, the API will deliver the write request to the operating system. However, a problem in such arrangements is that after the call, the API may block further processing activity of the caller application. The given API will return control to the caller only after data content pertaining to the write request has been written to the disk. This problem can affect both synchronous and asynchronous I/O operations.
In synchronous file I/O, an application thread starts an I/O operation and then immediately enters a wait state, until the I/O request has completed and the thread is notified of the completion. In asynchronous file I/O, an application thread calls an I/O request, and then continues processing another job until the operating system kernel signals to the thread that the called I/O operation is complete. The thread then interrupts its current job, and processes data pertaining to the I/O operation as necessary. Thus, application programs that write data to disk files generally are interrupted for a time which is directly proportional to the amount of data that must be written to the disk. This occurs because calls to start write operations by using the file system APIs are in turn implemented by the underlying operating system. The operating system blocks the calling application until the write operation is completed.