Method for vectoring pread/pwrite system calls

Electrical computers and digital processing systems: processing – Processing control – Processing control for data transfer

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C710S033000, C710S061000, C710S059000, C710S034000, C710S240000, C711S208000, C711S209000, C711S221000, C711S005000, C711S203000, C709S217000

Reexamination Certificate

active

06298437

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates generally to data transfers to and from memory in a computer system, and more particularly, to a method for vectoring pwrites or preads.
2. Description of the Relevant Art
An application program running on a microprocessor-based digital computer often initiates system calls to services of the operating system (OS). Each system call involves a context switch between the application program and the operating system. Context switches typically require the state of the microprocessor and/or other components of the computer system to be saved before execution of the system service of the operating system. The operating system in turn loads the microprocessor and/or other components of the computer system with information needed to run the system service. Upon completion of the system service, the microprocessor and/or other components of the computer system must be returned to the state it was prior to the context switch. This requires the saved state to be loaded into the microprocessor and/or other computer components before resuming execution of the application program.
It can be appreciated by one of ordinary skill in the art that the overhead associated with each context switch limits performance of an application program running on a microprocessor-based digital computer. It is also appreciated that there is an indirect relationship between the number of system calls during execution of an application program and the overall performance in running the application program. In other words, a greater number of system calls increases the number of context switches which in turn reduces overall performance.
I/O data transfer between memory and disk typically requires one or more system calls, each one of which requires a substantial amount of system overhead. For example, it is not uncommon for an executing application program to generate several requests to transfer data between memory and disk. To further illustrate, an executing application program may generate ten requests to read data from disk. In the prior art, each of the ten read requests required one or more system calls to complete. This is particularly true if each of the ten read requests identifies a distinct destination buffer in memory to receive data. In some database application programs, a pair of system calls (e.g., Iseek and read) is required for each requested read. The Iseek system call positions the disk so that data can be read from a particular sector in the file. The Iseek is needed since the read request may be directed to a sector in the file which may be remote from a previously read sector. The read system call subsequently reads data from the positioned sector of the disk, the read data ultimately being transferred to a destination buffer in memory.
To avoid the substantial overhead associated with two system calls, prior art implements preads and pwrites which combines a Iseek and a read or write. Preads and pwrites are often referred to as-composite system calls. Thus, preads and pwrites employ one system call to transfer data between disk and memory. Preads, for example, contain an offset, an address of the destination buffer in user space, and a number of bytes to be transferred. Although preads and pwrites reduce the number of system calls associated with individual requests for data transfer, each pread and pwrite nonetheless requires an individual system call.
Vector reads (readv) and vector writes (writev) have been employed in the prior art to further reduce overhead associated with data transfers between memory and disk. In readv and writev system calls, a list of read operations or write operations is provided. The operating system uses the list to transfer data between disk and memory. For example, in a writev system call, the write operations causes data to be gathered from various buffers in memory. The gathered data is then transferred to one location on the disk. Likewise, a list of read operations is used in a ready system call by the operating system to gather data from distinct sectors on the disk. The gathered data is then provided to one location in memory. Ready and writev reduce system overhead when data is being transferred, for example, between multiple noncontiguous buffers and a single sector or between multiple noncontiguous sectors and a single buffer. If the data is to be stored in distinct sectors or distinct buffers, however, individual systems calls are required and there is no overhead savings in using vread or vwrite.
SUMMARY OF THE INVENTION
The present invention provides a method for reducing overhead associated with system calls. For example, the present invention provides a method which reduces overhead associated with system calls for transferring data between memory and disk in a computer system. In one embodiment, the present invention creates a data transfer list in response to executing an application program. This data list comprises N entries, each one of which comprises a file sector descriptor associated with a disk and a buffer address associated with main memory. The application program is suspended upon creation of the data transfer list. Thereafter, the operating system of the computer is initiated, which then performs N data transfers between memory and disk. Each data transfer comprises transferring data between a file sector and a buffer identified by the file sector descriptor and buffer address, respectively, contained in a corresponding one of the N entries of the data transferred list Upon completion of all N transfers, the operating system is suspended and application program is reinitiated.


REFERENCES:
patent: 4974149 (1990-11-01), Valenti
patent: 5144692 (1992-09-01), Baker et al.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method for vectoring pread/pwrite system calls does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method for vectoring pread/pwrite system calls, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method for vectoring pread/pwrite system calls will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2582203

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.