Electrical computers and digital data processing systems: input/ – Input/output data processing – Input/output data buffering
Reexamination Certificate
1998-06-19
2004-04-13
Follansbee, John (Department: 2126)
Electrical computers and digital data processing systems: input/
Input/output data processing
Input/output data buffering
C710S007000, C710S036000
Reexamination Certificate
active
06721824
ABSTRACT:
FIELD OF THE INVENTION
The present invention is related to computer software and more specifically to computer software for intraprocess communication.
BACKGROUND OF THE INVENTION
Two computer processes can communicate using a shared file. If communication is in one direction, one process known as a “writer” writes a file, and the other process, known as the “reader” reads the file. Conventional processes use an operating system to write and read the file. Each operating system may use a slightly different arrangement to write or read files.
To produce the shared file using some conventional operating systems, the writer sends an “open for write” command to the operating system, including a filename or other identifier with which to name the file. The operating system may create the file and open it. Additionally, the operating system may lock the file in response to such a command in order to prohibit use of the file by other processes while the file is being written. The writer may receive from some conventional operating systems a pointer or other identifier of the file in response to the open for write command.
Once the file is opened, the writer uses a buffer in memory to communicate to the operating system the information to be written to the file. The writer stores the information in the buffer, and sends a “write” command to the operating system. The identifier of the file received from the operating system and a pointer to the buffer may be included as part of the write command in order to identify the file and the buffer.
The buffer may be allocated in any of several ways. The writer may allocate as a buffer a portion of the memory allocated to the writer by the operating system and pass a pointer to the buffer with the write command. The operating system may allocate the buffer and pass a pointer to the buffer to the writer in response to the open for write command. The buffer may be allocated using other methods as well.
When the operating system receives the write command, the operating system copies the contents of the buffer to the file. The writer may repeat the “write” command after placing additional information into the buffer again and again, until the writer has finished writing the file. The writer then sends to the operating system a “close” command. The operating system then places an “EOF”, or end-of-file marker, at the end of the file to alert any process that may read the file when the end of the file has been reached.
Once the file has been written, a similar process may be used to read the file. An “open for read” command containing the filename of the file to be read is sent to the operating system by the reader. The operating system allocates in memory a buffer which it will use to copy some or all of the file. When the reader sends the operating system a “read” command, the operating system copies some or all of the file into the buffer and returns to the reader a pointer to the buffer. The reader may use the pointer to retrieve the information copied into the buffer. The reader can repeat the read command again and again until it reads the end-of-file marker, at which point the reader closes the file by sending to the operating system a “close” command.
The use of a shared file requires the reader to wait until the entire file is written by the writer before the reader is able to read the contents of the file. This time can delay the start of processing of the information in the file by the reader. Additionally, if the amount of data in the file is large, significant storage resources may be required to store the file for such intraprocess communication. If these resources are not available, other communication methods must be employed.
One alternative communication method is to allow the two processes to communicate with one another directly. However, such communication may be more complex to implement than the use of the shared file approach described above. Additionally, if the two processes have already been designed for use with a shared file, rewriting the processes to facilitate direct communication may be highly complex.
Therefore, the system and method are needed to allow rapid communications to exist between processes designed for use with a shared file, without requiring the reader to wait until the writer completes writing a shared file, consuming significant system resources, or requiring significant alteration to the processes.
SUMMARY OF INVENTION
A method and apparatus intercepts from receipt by the operating system commands used to write and read shared files. When the writer fills a buffer and issues a write command, operation of the writer is suspended. Instead of writing the buffer to a file to be shared, the method and apparatus passes the data, for example by passing a pointer to the buffer, to the reader for immediate reading. When the reader completes reading the buffer, the writer is allowed to resume operation. The method and apparatus repeats the process until the writer issues a close command. At that point, an EOF indication is written into the buffer or otherwise passed to the reader. If desired, the method and apparatus can also suspend the writer when it sends the open for write command, until such time as the reader sends an open for read command, allowing the method and apparatus to more closely synchronize the operation of the two processes. Other embodiments of the method and apparatus utilize two or more buffers. The information is copied from the buffer used by the writer into a second buffer for use by the reader. This allows the suspension of the writer to end more quickly while still preventing subsequent operation of the writer from overwriting the information before the reader has had a chance to read it. A flag may be employed to indicate when the reader has started reading the second buffer. The flag may be used to additionally reduce the time the writer is suspended while ensuring that the buffer used by the writer is not copied into the second buffer before the reader has had a chance to read it.
Because the reader receives information from the writer as the writer writes it, the reader can begin processing the information received without waiting for the writer to send all of the information. Because less than all of the information produced by the writer may be stored at any given time, storage requirements may be significantly reduced when compared with the storage of the entire shared file. Because all of the commands sent between the writer and the method and apparatus are conventional commands that would have been used in shared file communications between the writer and the operating system, the writer requires no modification to operate with the method and apparatus of the present invention. Because all or nearly all of the commands sent between the reader and the method and apparatus are conventional commands that would have been used in shared file communications between the reader and the operating system, the reader requires no or little modification to operate with the method and apparatus of the present invention.
REFERENCES:
patent: 4855994 (1989-08-01), Takeuchi et al.
patent: 4953123 (1990-08-01), Takeuchi et al.
patent: 5062073 (1991-10-01), Masuda et al.
patent: 5406554 (1995-04-01), Parry
patent: 5640515 (1997-06-01), Park
patent: 5673415 (1997-09-01), Nguyen et al.
patent: 5748539 (1998-05-01), Sproull et al.
patent: 5867672 (1999-02-01), Wang et al.
patent: 6073219 (2000-06-01), Ohno
Cisco Technology Inc.
Follansbee John
Hickman Palermo & Truong & Becker LLP
Nguyen V. H.
LandOfFree
Method and apparatus for assisting communication of... 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 and apparatus for assisting communication of..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and apparatus for assisting communication of... will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-3204828