Patent ID: 7904618
Filing Date: 2011-03-08
Classification: G06F

Abstract:
1. A method for managing a sequential buffer which is divided into a plurality of blocks and capable of being simultaneously accessed by a plurality of processing entities, the blocks being used cyclically in order by at least two processing entities comprising a producer and a consumer as a temporary storage location for data to be transferred between the processing entities, the producer being a processing entity for writing data, the consumer being a processing entity for reading data written by the producer, the method comprising: updating and retaining block state information including at least two strings comprising bits, wherein each of the bits is assigned to indicate a state of a respective one of the plurality of buffer blocks such that bits of a first of the at least two strings indicate a write-completed state of respective buffer blocks and bits of a second of the at least two strings indicate a read-completed state of the respective buffer blocks; providing a first leading pointer, a second leading pointer, a first following pointer, and a second following pointer each of which points to one of the blocks and moves in the order of the block sequence under a constraint that all the pointers move in the same direction, and the first leading pointer, the second leading pointer, the first following pointer, and the second following pointer do not pass each other in this order; when the producer writes data, determining the block designated by the first leading pointer as a block to be written, and moving the first leading pointer to a next block, after the block designated by the second leading pointer finishes being written, moving the second leading pointer to a block next to a block that is farthest from the second leading pointer among consecutive write-completed blocks subsequent to the block designated by the second leading pointer, the consecutive write-completed blocks being indicated by bits of the first string, when the consumer reads data, determining the block designated by the first following pointer as a block to be read, and moving the first following pointer to a next block, and after the block designated by the second following pointer finishes being read, moving the second following pointer to a block next to a block that is farthest from the second following pointer among consecutive read-completed blocks subsequent to the block designated by the second following pointer, the consecutive read-completed blocks being indicated by bits of the second string.