WO2007020740A1 - バッファ管理方法およびバッファ管理装置 - Google Patents

バッファ管理方法およびバッファ管理装置 Download PDF

Info

Publication number
WO2007020740A1
WO2007020740A1 PCT/JP2006/310908 JP2006310908W WO2007020740A1 WO 2007020740 A1 WO2007020740 A1 WO 2007020740A1 JP 2006310908 W JP2006310908 W JP 2006310908W WO 2007020740 A1 WO2007020740 A1 WO 2007020740A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
pointer
tracking
writing
reading
Prior art date
Application number
PCT/JP2006/310908
Other languages
English (en)
French (fr)
Inventor
Keisuke Inoue
Yasukichi Ohkawa
Original Assignee
Sony Computer Entertainment Inc.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Computer Entertainment Inc. filed Critical Sony Computer Entertainment Inc.
Priority to EP06756828.7A priority Critical patent/EP1936501B1/en
Priority to US11/996,359 priority patent/US7904618B2/en
Publication of WO2007020740A1 publication Critical patent/WO2007020740A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/06Methods or arrangements for data conversion without changing the order or content of the data handled for changing the speed of data flow, i.e. speed regularising or timing, e.g. delay lines, FIFO buffers; over- or underrun control therefor
    • G06F5/10Methods or arrangements for data conversion without changing the order or content of the data handled for changing the speed of data flow, i.e. speed regularising or timing, e.g. delay lines, FIFO buffers; over- or underrun control therefor having a sequence of storage locations each being individually accessible for both enqueue and dequeue operations, e.g. using random access memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Definitions

  • the present invention relates to a method and a buffer management device for managing a nofer for exchanging data between processing entities in a system that can have a plurality of processing entities.
  • a multiprocessor system in which a plurality of processors are mounted in one system can execute processing in parallel or in cooperation to achieve high speed overall processing.
  • parallel cooperative processing data is exchanged between processors, and data generated by a processor called a producer is passed to a processor called a consumer and processed by the consumer.
  • a processor called a consumer data generated by a processor called a producer
  • the efficiency of the entire system will change.
  • the present invention has been made in view of the above circumstances, and an object of the present invention is to manage a buffer for exchanging data between processing entities in a system that can have a plurality of processing entities to improve processing efficiency. It is to provide a buffer management technique that can be improved.
  • the first aspect of the present invention is divided into a plurality of blocks, and each block is a processing entity on the data writing side as a temporary storage location for data transferred between the processing entities.
  • Read a producer and the data written by the producer This is a method of managing the buffers that are used in a predetermined order by the consumer that is the processing entity on the side.
  • a preceding pointer and a tracking pointer indicating the block are provided for the block to be written first, and whether the block is in use, writing completed, or reading completed.
  • the block state information shown in association with the block is held. Then, after the writing to the block to be written first is started, the position of the pointer and the block state information are updated according to the progress of writing and reading.
  • the next block is brought into a read complete state after the start of writing to the block indicated by the preceding pointer. Only in some cases, advance the previous pointer to the next block. After the reading of the block indicated by the tracking pointer is started, the tracking pointer is advanced to the next block only when the next block is in the write completion state.
  • processing entity means an entity that processes data, and is capable of reading and processing temporary storage capacity data or processed data. Data can be written to a temporary storage location.
  • This processing entity is not limited to each processor in a multiprocessor system, but includes tasks, processes, threads, and the like.
  • the second aspect of the present invention is also divided into a plurality of blocks, each of which is a processing entity on the data writing side serving as a temporary storage location for data transferred between the processing entities.
  • This is a method of managing a buffer that is circularly used in a predetermined order by a certain producer and a consumer that is a processing subject on the side of reading data written by the producer.
  • This method includes a block including write completion information indicating whether writing is completed or other than that in association with the block, and reading completion information indicating that reading is completed or other force is associated with the block. Holds status information while updating it.
  • a first preceding pointer, a second preceding pointer, a first tracking pointer, and a second tracking pointer indicating the block are provided for the block to be written first.
  • the first leading pointer indicating the block is advanced to the next block.
  • the second leading pointer force is the farthest among the blocks that are continuous and in the writing completion state indicated by the second leading pointer. Advance the second predecessor pointer to the next block.
  • the first tracking pointer indicating the block is advanced to the next block.
  • the block force indicated by the second tracking pointer continues and the block that is in the reading completion state is farthest from the second tracking pointer. Advance the second tracking pointer to the next block.
  • the present invention is advantageous in data exchange between processing entities in a system that can have a plurality of processing entities such as a multiprocessor and a multitask.
  • FIG. 1 is a diagram showing a multiprocessor system according to a first embodiment that is useful for the present invention.
  • FIG. 2 is a diagram showing a shared memory of the multiprocessor system shown in FIG.
  • FIG. 3 is a diagram showing an initial state of a buffer provided in the shared memory shown in FIG.
  • FIG. 4 is a diagram showing an initial state of the bitmap held in the shared memory shown in FIG.
  • FIG. 5 is a diagram for explaining the progress of the pointer.
  • FIG. 6 is a diagram for explaining the progress of pointers and the updating of bitmap information.
  • FIG. 7 is a diagram showing a relationship between a bit value of each bit of a bitmap and a block state.
  • FIG. 8 is a diagram showing a multiprocessor system according to a second embodiment that is useful for the present invention.
  • FIG. 9 is a diagram showing a shared memory of the multiprocessor system shown in FIG.
  • FIG. 10 is a diagram showing an initial state of a buffer provided in the shared memory shown in FIG.
  • FIG. 11 is a diagram showing an initial state of two bit strings held in the shared memory shown in FIG. [Fig.12] Diagram for explaining pointer progress and bit string update (part 1)
  • FIG. 14 is a diagram for explaining determination of the destination of the second tracking pointer and update of the bit string after completion of reading of the block indicated by the second tracking pointer.
  • FIG. 15 is a diagram showing a bit string updated after completion of reading of the block indicated by the second tracking pointer.
  • FIG. 16 is a diagram showing the state of the notper and the bit string after the second tracking pointer has been advanced.
  • FIG. 17 is a diagram showing a multiprocessor system according to a third embodiment of the present invention.
  • FIG. 18 is a diagram showing a shared memory of the multiprocessor system shown in FIG.
  • first leading pointer 145 ... second leading pointer, 148 ... first tracking pointer, 149 ... second tracking pointer, 150 ... ⁇ Shared memory, 200 ⁇ Multiprocessor system, 210 ⁇ Processing unit, 212 ⁇ Processor, 214 ⁇ Local memory, 220 ⁇ Buffer, 230 ⁇ Bit string, 240 ⁇ Pointer Queue, 250 ... shared memory.
  • a first aspect that is useful in the present invention is a processing entity on the data writing side serving as a temporary storage location of data that is divided into a plurality of blocks, and each block is transferred between the processing entities.
  • This is a method of managing a buffer that is circularly used in a predetermined order by a certain producer and a consumer that is a processing subject on the side of reading data written by the producer.
  • This method uses the block for the block to be written first.
  • a preceding pointer and a tracking pointer are provided to indicate block status, and block status information indicating whether it is in use, writing completed, or reading completed is associated with the block. Then, after the writing to the block to be written first is started, the position of the pointer and the block state information are updated according to the progress of writing and reading.
  • the "processing entity” means an entity that processes data, and is capable of reading and processing temporary storage location force data or temporarily processing processed data. It is possible to write to a general storage location.
  • This processing entity is not limited to each processor in a multiprocessor system, but includes tasks, processes, threads, and the like.
  • this method is referred to as a first method.
  • a method of using a buffer to exchange data between the processing entities can be considered.
  • the producer writes the processed data to the buffer, and the consumer can also read and process the data from the nofka, thus improving the processing efficiency of the entire system.
  • the first method of the present invention realizes secure multi-access to a buffer having a plurality of blocks that are cyclically used in a predetermined order. This method keeps the block status information indicating whether it is in use or writing complete power reading complete while updating it, and the preceding pointer and the tracking pointer advance in the same direction and do not overtake each other. To advance the leading pointer and tracking pointer.
  • the preceding pointer After the start of writing to the block indicated by the preceding pointer, the preceding pointer is advanced to the next block only when the next block is in a read complete state. Here, the timing to advance the leading pointer is left to the system design.
  • next block is already in the read completion state at the start of writing to the block indicated by the preceding pointer, the preceding pointer is advanced to the next block at the start of writing.
  • the next block is not yet in the read completion state when writing to the block indicated by the previous pointer is started, the previous block is read when the next block is in the read completion state after the start of writing.
  • a system that advances the pointer to the next block can be considered.
  • the block force reading completion state indicated by the preceding pointer, the in-use state indicating that the block in which writing was last started is being written, and the writing indicating that this block has been written are completed. Is in one of the completion states.
  • the next producer finds the leading pointer and checks whether this block is in a read complete state, and can write if it is in a read complete state.
  • the leading pointer points to the block where writing was last started, and the next producer finds the leading pointer and follows the block indicated by the leading pointer. It is possible to consider a system that confirms whether or not the current block is in a read complete state, and if it is in a read complete state, advances the preceding pointer to the next block and starts writing to the next block.
  • the second aspect of the present invention is also a processing entity on the data writing side as a temporary storage location of data that is divided into a plurality of blocks and each block is transferred between the processing entities.
  • This is a method of managing a buffer that is circularly used in a predetermined order by a producer and a consumer that is a processing subject on the side of reading data written by the producer. This method also realizes secure multi-access, and this method is referred to as the second method below.
  • the preceding pointer and the tracking pointer are used in the same manner as in the first method for the designation of the block to be written by the producer and the designation of the block to be read by the consumer.
  • the leading pointer and the tracking pointer that play the same role as the leading pointer and the tracking pointer in the first method are respectively set to the first pointer and the tracking pointer.
  • the first preceding pointer, the second preceding pointer, the first tracking pointer, and the second tracking pointer indicating the block are set for the block to be written first.
  • block status information indicating whether writing is completed or not, reading completed or other force is associated with the block is held. Then, after the writing to the block to be written first is started, the position of the pointer and the block state information are updated according to the progress of writing and reading.
  • the second leading pointer is a pointer that follows the first leading pointer and advances after the writing to the block indicated thereby is completed.
  • the second tracking pointer is a pointer that follows the first tracking pointer and advances after the reading of the block indicated thereby is completed.
  • the four pointers have the same traveling direction in the order of the first leading pointer, the second leading pointer, the first tracking pointer, and the second tracking pointer, and Mutual In addition, it is possible to proceed under the restrictions.
  • the block between the first tracking pointer and the second preceding pointer is a block in the write completion state along the direction of movement of the pointer.
  • the block between the first leading pointer and the second tracking pointer is a block that is in a read complete state.
  • the block up to the second tracking pointer is a block in the write completion state, so the advance block is completely written. There is no need to check if the force is correct.
  • the first tracking pointer is advanced, since the blocks up to the second preceding pointer are in a read completion state, whether or not the advance block is completely read is I need to check!
  • the second predecessor pointer is a pointer that is advanced after completion of writing to the block indicated thereby. While the second leading pointer force is also up to the first leading pointer, there are blocks that are being written and blocks that have been written, and writing is started earlier as the block is away from the first leading pointer force. .
  • the blocks indicated by the second leading pointer and the first leading pointer are the A block and the F block, respectively. Between them, B, C, D, E 4 arranged in the direction of the pointer progress. Take the case where there are two blocks.
  • the write start order of these six blocks is A, B, C, D, E, F.
  • Writing to a block that has started writing is not always completed first. For example, during the writing of the A block indicated by the second leading pointer, the writing of the B and C blocks may be completed. When the writing of block A is completed, simply moving the second leading pointer to the next block (block B), the C block has already written, and Can not be used by one person.
  • the writing of the A block is completed by holding the information included in the block state information and indicating whether the writing is completed or not, the writing is completed.
  • the second tracking pointer force is also advanced to the block (D block) next to the farthest block (C block). This allows the second predecessor pointer to advance to the earliest block in the range that can be advanced even if the block writing is not completed in the starting order. Blocks that have been written can be used quickly for consumers.
  • the second tracking pointer By holding information indicating whether or not the reading is completed, the second tracking pointer is set to the highest even when the block reading is not completed in the starting order. Since it is possible to proceed to the previous block, the block that has been read out can be quickly provided to the producer.
  • the producer may not be able to end the process even if the writing is completed.
  • the producer that writes to the B block will complete the writing of the A block and advance the second leading pointer to advance the second leading pointer even if the writing is completed.
  • the process cannot be completed until is advanced to block B.
  • the producer of the C block In this case, the producers of the B block and the C block cannot release the processed data even after the writing is completed, so that the processing efficiency of the system is lowered.
  • the producer force of the writing is completed, for example, the producer force of the B block, when the writing is completed. If the information is updated, the producer of the A block can refer to the information and advance the second head pointer, so the producer of the B block can complete the writing without having to wait for the A block to be written. As soon as the process can be finished.
  • the second method of the present invention also realizes secure multi-access. Can do. Further, even if writing or reading is not completed in the starting order, it is possible to prevent a reduction in system processing efficiency.
  • FIG. 1 shows a configuration of a multiprocessor system 100 according to the first embodiment of the present invention.
  • the multiprocessor system 100 includes a plurality of processing units 10A, a plurality of processing units 10B, and a shared memory 50, and each processing unit is connected to the shared memory 50.
  • each processor is included in each processing unit.
  • These processing units can be divided into main processing units and sub-processing units. All of the sub-processing units may be implemented using the same architecture or may have different configurations.
  • the main processing unit may be located locally with respect to the sub-processing unit, for example, on the same chip, the same package, the same circuit board and the same product as the sub-processing unit. It may be located in a different product that can be connected remotely via a communication network such as a bus or the Internet.
  • the sub-processing units may be located locally or remotely from each other.
  • the plurality of processing units 10A and 10B in the multiprocessor system 100 shown in FIG. 1 may include a main processing unit.
  • Each processing unit 10A includes a processor 12A and a local memory 14A
  • each processing unit 10B includes a processor 12B and a local memory 14B.
  • the processor 12A can read / write data from / to the local memory 14A
  • the processor 12B can read / write data from / to the local memory 14B.
  • the multiprocessor system 100 is a system related to transfer of stream data, and each processing unit 10A has a predetermined transfer unit of stream data (hereinafter simply referred to as data) provided in the shared memory 50, which will be described later.
  • Data a predetermined transfer unit of stream data
  • Each processing unit 10B reads and transfers the data written by the processing unit 10A.
  • the processor 12A since the processing unit 10A is the side that writes data into the buffer 20, the processor 12A is a producer. Since the processing unit 10B is on the data reading side, the processor 12B is a consumer.
  • Either one of the processing unit 10A or the processing unit 10B is used for the use of the buffer 20. It serves as a service unit for other processing units.
  • the role of the service queue is, for example, setting of the initial state of the buffer 20 and initial setting of a pointer described later.
  • This service unit may be handled by any processing unit. If the processing unit 10A or the processing unit 10B has a main processing unit, this service unit is preferably handled by the main processing unit, but is not limited thereto.
  • FIG. 2 shows the shared memory 50.
  • the shared memory 50 includes a buffer 20 and a bitmap 30, and a leading pointer 44 and a tracking pointer 48 are provided for the notfer 20.
  • FIG. 3 shows the buffer 20.
  • the koffa 20 is divided into a plurality of continuous blocks, and each block is cyclically used in a predetermined order, for example, the order indicated by the arrow L in the figure.
  • the block to be written first is the 0th block shown in FIG. 3, and the leading pointer 44 and the tracking pointer 48 are one more than the 0th block when each block is circularly used.
  • the block used first (the nth block in the figure) is set as the initial position.
  • FIG. 4 shows the bitmap 30 in the initial state.
  • the bitmap 30 has a bit string 30a and a bit string 30b in which one block is allocated to each block of the buffer 20, and whether the block is in use (writing or reading) or writing is completed. Block state information indicating whether reading is completed.
  • the initial value of each bit of the bit string 30a is 1, and the initial value of each bit of the bit string 30b is 0.
  • FIG. 5 is a diagram showing a process in which any producer 12A moves the leading pointer 44 when writing stream data into the buffer 20.
  • the producer 12A first searches for the leading pointer 44 in the buffer 20. Since the leading pointer 44 indicates the nth block, the producer 12A refers to the bit string 30a and confirms the value of the block next to the nth block, that is, the block corresponding to the 0th block. To do.
  • the value of the bit corresponding to the 0th block is the initial value 1
  • the producer 12A advances the preceding pointer 44 to the 0th block and starts writing to the 0th block. Then, the bit value corresponding to the 0th block in the bit string 30a is changed to 0.
  • this producer 12A also searches for the leading pointer 44 in the buffer 20 first. Since the leading pointer 44 is at the position of the 0th block, this producer refers to the bit string 30a, and since the value of the bit corresponding to the first block is 1, the leading pointer 44 is set to the first block. Then, writing to the first block is started, and the value of the bit corresponding to the first block in the bit string 30a is changed to zero.
  • the producer 12A that has performed the writing changes the value of the bit corresponding to this block to 1 in the bit string 30b.
  • the value of the bit corresponding to the 0th and 2nd blocks in the bit string 30b is changed to 1.
  • any consumer 12B first searches the tracking pointer 48 in the buffer 20.
  • the tracking leading pointer 48 indicates the n-th block, so the consumer 12B refers to the bit string 30b and the block next to the n-th block, that is, the block corresponding to the 0-th block.
  • Check the value if the value of the bit corresponding to the 0th block is 0, it indicates whether the 0th block is in an initial state where writing has not yet been performed or is being written, and if the bit value is 1, The 0th block indicates that writing has been completed.
  • the consumer 12B advances the tracking pointer 48 to the 0th block only when the value of the bit corresponding to the 0th block in the bit string 30b is 1, starts reading the 0th block, Change the bit value corresponding to block 0 in bit string 30b to 0.
  • FIG. 6 shows the state of the buffer 20 and the bit strings 30a and 30b at this time.
  • the leading pointer 44 indicates the second block where writing was last started
  • the tracking pointer 48 indicates the zeroth block where reading was last started. No. 0, No. 1 block Is in use, and the second block is in a write complete state. This state can be read from the bit string 30a and the bit string 30b, which will be described later.
  • bit value of this block is set to 1 by the consumer 12B that has performed the reading.
  • bit value is reset to 0 by the producer 12A that started writing.
  • bit value of this block is set to 1 by the producer 12A that performed the writing.
  • bit value is reset to 0 by the producer that started reading.
  • the block corresponding to the bit is in use, in the write complete state, or in the read complete state, depending on the bit value of the bit string 30a and the bit value of the bit string 30b. Can show.
  • the leading pointer 44 indicates the block where writing has been started last.
  • the producer 12A searches the buffer 20 for the leading pointer 44 and refers to the bit string 30a. Thus, it is confirmed whether or not the block next to the block indicated by the preceding pointer 44 is in a read completion state.
  • the value of the bit of this block in the bit string 30a that is, if this block is in a read complete state, the leading pointer 44 is advanced to this block to start writing, and the bit corresponding to this block in the bit string 30a Reset the value of to 0.
  • the tracking pointer 48 indicates the block from which reading has been started last, and the consumer 12B searches the tracking pointer 48 from the nota 20 and reads the tracking pointer 48 by referring to the bit string 30b. Check whether the block next to the block indicated by 48 is in the write completion state. If the bit value of this block in the bit string 30b is 1, that is, if this block is in the write complete state, the tracking pointer is advanced to this block. Then, reading is started and the bit value corresponding to this block is reset to 0 in the bit string 30b.
  • the producer 12A and the consumer 12B advance the pointers under the constraints that the two pointers advance in the same direction and follow each other, the kana! /, And! /.
  • secure multiaccess can be realized by using the bitmap 30 and two pointers in combination.
  • FIG. 8 shows a configuration of a multiprocessor system 200 according to the second embodiment of the invention.
  • the multiprocessor system 200 has a plurality of processing units 110 and a shared memory 150, and each processing unit 110 is connected to the shared memory 150.
  • the plurality of processing units 110 in the multiprocessor system 200 may include a main processing unit.
  • Each processing unit 110 has a processor 112 and a local memory 114.
  • the processor 112 can read / write data from / to the local memory 114.
  • each processing unit 110 performs processing in parallel, and each processor 112 writes the processed data in a buffer 120 described later, and after writing, the nota 120 Then, the data written by the other processing unit 110 is copied to the local memory 114 for processing. That is, the processor 112 included in the processing queue 110 can be either a producer or a consumer. In the following description, the same processor is called a producer or consumer depending on whether it is a data writing side or a data reading side.
  • Any one of the processing units 110 will serve as a service unit for other processing units with respect to the use of the buffer 120.
  • the role of the service unit is, for example, setting of the initial state of the buffer 120 and initial setting of a pointer described later.
  • This service unit may be handled by any processing unit. If there is a main processing unit in the processing unit 110, this service unit is preferably handled by the main processing unit, but is not limited thereto.
  • FIG. 9 shows the shared memory 150.
  • the shared memory 150 includes a nofer 120, a bit string 130a, and a bit string 130b, and a first leading pointer 144 and a second leading pointer with respect to the buffer 120.
  • a row pointer 145, a first tracking pointer 148, and a second tracking pointer 149 are provided.
  • the bit string 130a has a bit width corresponding to the number of producers that can be accessed simultaneously
  • the bit string 130b has a bit width corresponding to the number of consumers that can be accessed simultaneously.
  • FIG. 10 shows the buffer 120.
  • the noffer 120 is divided into a plurality of continuous blocks, and each block is sequentially circulated in a predetermined order, for example, the order indicated by the arrow L in the figure.
  • the first block to be written is the 0th block shown in Fig. 10, and all pointers are one ahead of the 0th block when each block is used cyclically.
  • the block used for (the nth block in the figure) is the initial position.
  • the service unit performs setting of the force pointer that starts writing of the block power first, determination of the initial position of the pointer, and the like.
  • each bit of the bit string 130a has a value of 1, it indicates that the block corresponding to the bit is in a write-completed state, and when it has the value ⁇ , it corresponds to the bit. Indicates that the block is in a state other than the write complete state.
  • each bit of the bit string 130b has a value of 1, it indicates that the block corresponding to the bit is in a read-completed state, and when it has the value ⁇ , the block corresponding to the bit Is in a state other than the read completion state.
  • FIG. 11 shows the bit string 130a and the bit string 130b in the initial state. As shown in the figure, both bit strings are in the initial state, and the value of each bit is 0.
  • FIG. 12 is a diagram showing processing performed by the service unit before writing is started by any processing unit 110. As shown, the service unit moves the first leading pointer 144 and the second leading pointer 145 from the n-th block at the initial position before any processing unit writes data to the buffer 120. Then, move to the first 0th block and assign each bit of the bit string 130a to 8 blocks from 0th block to 7th block.
  • any of the producers 112 first performs buffering in order to write data.
  • the first leading pointer 144 at the key 120 is retrieved.
  • the producer 112 since the first leading pointer 144 indicates the 0th block, the producer 112 performs writing by copying the data to the 0th block in its local memory 114.
  • the producer 112 advances the first leading pointer 144 to the next block, that is, the 1st block.
  • this producer 112 also searches the first leading pointer 144 in the buffer 120 first. Since the first leading pointer 144 is at the position of the first block, this producer 112 starts writing to the first block and moves the first leading pointer 144 to the next block, i.e. Proceed to the block.
  • FIG. 13 shows the position of each pointer and the value of each bit in the bit string 130a at this time. The first leading pointer 144 is in the second block, and the second leading pointer 145 is in the zeroth block. The value of each bit in the bit string 130a remains 0, indicating that no blocks have been written from the 0th block to the 7th block.
  • the producer 112 that performed the writing advances the second leading pointer 145.
  • the destination will be described later.
  • the second advance pointer 145 is advanced, and the bit string 130a is assigned to 8 blocks in which the advance block power is also continuous.
  • the service unit moves the first tracking pointer 148 and the second tracking pointer 149 to the 0th block.
  • Each bit of the bit string 130b is allocated to a total of 8 blocks from the 0th block to the 7th block. With this, the management of the buffer 120 is left to each processing unit.
  • the producer 112 and the consumer 112 have the same traveling direction of the four pointers, the first leading pointer 144, the second leading pointer 145, the first tracking pointer 148, and the second tracking. Don't overtake each other in the order of pointer 149 Move the pointer forward under constraints.
  • the producer 112 searches the buffer 120 for the first leading pointer 144 and writes the block indicated by the first leading pointer 144. As the writing starts, the first leading pointer 144 is advanced to the next block.
  • the producer 112 When writing to a block other than the block indicated by the second leading pointer 145 is completed, the producer 112 that has performed the writing sets the value of the corresponding bit to 1 in the bit string 130a. To finish the process.
  • the consumer 112 searches the buffer 120 for the first tracking pointer 148 and reads the block indicated by the first tracking pointer 148. As the reading is started, the first tracking pointer 148 is advanced to the next block.
  • the second leading pointer 145 is a pointer that is advanced after the writing of the block indicated by the pointer is completed, and the second tracking pointer 149 is advanced after the reading of the block indicated by the pointer is completed. Pointer.
  • FIG. 14 taking the state of FIG. 14 as an example, a process performed by the consumer 112 when reading of the block indicated by the second tracking pointer 149 is completed will be described.
  • the first leading pointer 144 is advanced to the ninth block, and the second leading pointer 145 is advanced to the seventeenth block.
  • the first tracking pointer 148 indicates that the block up to the 15th block has been advanced, and reading has started for the block up to the 14th.
  • the second tracking pointer 149 indicates that the 11th block has been advanced and that the reading of the 10th block has been completed.
  • Bit string 130b is allocated to 8 blocks from No. 11, and all bit values are 0. Bit string 130b is the second tracking point. Since the second tracking pointer does not overtake the first tracking pointer 148, the value of the bit in the block ahead of the first tracking pointer is a value. Set all to zero.
  • the reading start order is 11, 12, 13, and 14.
  • the end order is not necessarily the start order.
  • the reading end order is assumed to be 13, 1, 2, 11, 14.
  • the consumer 112 of the 12th block Upon completion of reading, the consumer 112 of the 12th block also sets the value of the bit corresponding to the 12th block in the bit string 130b (here, the 2nd bit) to 1 and ends the process. .
  • Each bit of the bit string 130b at this time has a value of 1 corresponding to the three blocks No. 11, No. 12, No. 13, and No. 11, as shown in FIG. The value of this bit is 0.
  • the consumer 112 uses an atomic command such as clz to determine the number of bits followed by a value of 1 starting from the first bit of the bit string 130b. In the example shown in Figure 15, a result of 3 is obtained.
  • the consumer 112 advances the second tracking pointer 149 according to the obtained result. In the example shown in FIG. 14, the second tracking pointer 149 is advanced from the 11th block force to the 14th block.
  • the consumer 112 advances the second tracking pointer 149, assigns the bit string 13 Ob to the eight blocks from the current position of the second tracking pointer 149, and ends the processing.
  • the reading is performed.
  • the performed consumer 112 sets the value of the bit corresponding to this block in the bit string 132b to 1, the block power indicated by the second tracking pointer 149 is continuous, and the first block out of the blocks in the read completion state.
  • the tracking pointer force of 2 advances the second tracking pointer 149 to the block next to the farthest block. Then, the bit string 130b is allocated to eight blocks from the current position of the second tracking pointer 149.
  • FIG. 16 shows the position of the pointer and the bit string 130b at this time.
  • the second tracking pointer 149 is advanced to the 14th block, and the bit string 130b is allocated to the 8 blocks from the 14th.
  • the producer 112 that performed the writing sets the value of the bit corresponding to this block in the bit string 132a to 1, and the second Among the blocks in which the block force indicated by the preceding pointer 145 continues and is in the write completion state, the second leading pointer 145 is advanced to the block next to the block farthest from the second leading pointer 145. Then, the bit string 130a is assigned to eight blocks from the current position of the second leading pointer 145, and the process is terminated.
  • bit string 130a indicating whether the writing has been completed or not is held only for the eight consecutive blocks from the second preceding pointer 145, so that the second leading Information necessary to advance the pointer 145 can be provided, and the bit width of the bit string 130a can be reduced.
  • bit string 130b This also contributes to improving the processing efficiency of the system.
  • bit string 130a is required to advance the second leading pointer 145
  • bit string 130b is required to advance the second tracking pointer 149.
  • the second leading pointer 145 is advanced by holding the bit string 130a and the bit string 130b separately.
  • the buffer management method used in the second embodiment is not limited to the multiprocessor system as shown in FIG. 8, but is a multi-processor for transferring stream data as shown in FIG. Data can be exchanged between processors such as processor systems! Applicable to any multiprocessor system.
  • FIG. 17 shows a multiprocessor system 300 according to the third embodiment of the present invention.
  • the multiprocessor system 300 includes a plurality of processing units 210 and a shared memory 250, and each processing unit 210 is connected to the shared memory 250.
  • the plurality of processing units 210 in the multiprocessor system 300 may include a main processing unit.
  • Each processing unit 210 has a processor 212 and a local memory 214.
  • the processor 212 can read / write data from / to the local memory 214.
  • each processing unit 210 performs processing in parallel, and each processor 212 writes the processed data in a buffer 220, which will be described later.
  • the data written by the other processing unit 210 is copied to the local memory 214 for processing. That is, the processor 212 included in the processing queue 210 can be either a producer or a consumer. In the following description, the same processor is called a producer or consumer depending on whether it is a data writing side or a data reading side.
  • Any one of the processing units 210 will serve as a service unit for other processing units with respect to the use of the buffer 220.
  • the role of the service unit is, for example, setting of the initial state of the buffer 220 and initial setting of a bit string described later.
  • This service unit may be assigned by any processing unit. If there is a main processing unit in the processing unit 210, this service unit is preferably handled by the main processing unit, but is not limited thereto.
  • FIG. 18 shows the shared memory 250.
  • the shared memory 250 includes a nother 220, a bit string 230, and a pointer queue 240.
  • the nother 220 is divided into a plurality of continuous blocks, and an identifier (here, a block number) is assigned to each block.
  • the bit string 230 has a bit width corresponding to the number of blocks included in the buffer 220, and each bit corresponds to each block.
  • the initial value of all bits is 0.
  • the pointer queue 240 holds the numbers of blocks for which writing has been completed in the order of writing completion.
  • any producer 212 wants to start writing, it selects a block corresponding to a bit having a value of 0 from the bit string 230 as a block that can be written. Start writing to the lock. With the start of writing to the block, the producer 212 sets the value of the bit corresponding to this block in the bit string 230 to 1.
  • the producer 212 puts the number of the block for which writing has been completed in the pointer queue 240, and ends the processing.
  • consumer 212 When consumer 212 wants to start reading, consumer 212 refers to pointer queue 240, deletes the number of the block that has been written first, from pointer queue 240, and starts from the block corresponding to this number. Read data. When reading is completed, the value of the bit corresponding to this block in the bit string 230 is reset to zero.
  • bit string 230 indicates whether each block is in the read completion state or in any other state, and whether or not the power is in the pointer queue 240 is in the write completion state or other state. If there are multiple blocks in the write completion state, the completion order is also shown.
  • the multiprocessor system 300 also realizes secure multiaccess!
  • the buffer management method used in the third embodiment is not limited to the multiprocessor system as shown in FIG. 17, but is also a multiprocessor for transferring stream data as shown in FIG. Data can be exchanged between processors such as systems! It can be applied to any multiprocessor system.
  • the buffer on the shared memory is also synchronized by updating and holding each bit string in the atomic area on the shared memory.
  • the information required by the producer includes information indicating whether or not the reading has been completed (the bit string 30a in the embodiment shown in FIG. 1) and the preceding information.
  • the information necessary for the consumer which is a pointer, is information indicating whether or not writing has been completed (in the embodiment shown in FIG. 1, bit string 30b) and a tracking pointer. Therefore, the leading pointer and tracking pointer do not need to be shared between the producer and consumer.
  • the information that needs to be shared is shared by transmitting the necessary information to each other using the producer and consumer's power message passing methods. Can do. Specifically, when the writing is completed, the producer updates the writing completion information and sends it to the consumer, and the consumer receives the received information and the writing completion information held by itself. Is updated to accumulate, for example, by ORing the bit string. The same is true for the read completion information.Consumers that have completed reading update the read completion information and send it to the producer. The producer uses the received information and the read completion information that it holds for example. Update by OR command. With such an implementation, buffer synchronization can be realized without using a shared memory to hold the bit string.
  • the processor is a processing entity as an example and the system is a multiprocessor system.
  • the buffer management technique according to the present invention uses a processing entity as a task ( It can be applied to any multitasking system (including processes, threads, etc.). Industrial applicability
  • the present invention can be used for electronic devices such as computers, mobile phones, and game devices that process a plurality of tasks in parallel.

Abstract

 図2において、バッファ20に対して先行ポインタ44と追尾ポインタ48を設け、使用中、書込完了、読出完了のいずれの状態にあるかを各ブロックに2ビットを割り当てたビットマップを更新しながら保持する。2つのポインタが同じ方向に進行し、かつ互いに追い抜かない制約の下で、先行ポインタ44により示されるブロックに対する書込の開始後、次のブロックが読出完了状態にある場合に限り、先行ポインタ44を次のブロックに進め、追尾ポインタ48により示されるブロックに対する読出の開始後、次のブロックが書込完了状態にある場合に限り、追尾ポインタ48を次のブロックに進める。

Description

明 細 書
ノッファ管理方法およびバッファ管理装置
技術分野
[0001] 本発明は、複数の処理主体を有しうるシステムにおける各処理主体間でデータを 授受するためのノ ッファを管理する方法およびバッファ管理装置に関する。
背景技術
[0002] 1つのシステムに複数のプロセッサを搭載したマルチプロセッサシステムは、並列に 、あるいは協調して処理を実行して処理全体の高速ィ匕を図ることができる。並列協調 処理にはプロセッサ間のデータの授受が伴い、プロデューサと呼ばれるプロセッサに より生成されたデータは、コンシユーマと呼ばれるプロセッサに渡され、コンシユーマ により処理される。プロデューサとコンシユーマとの間のデータの授受の工夫次第で、 システム全体の効率が変わってくる。
[0003] また、マルチプロセッサシステムに限らず、マルチタスク(プロセス、スレッドなどを含 む)環境において、タスク間でデータの授受が行われる。本明細書では、以下の説明 において、互いにデータの授受が行われるプロセッサ、タスクなどを処理主体という。 マルチタスクの場合おいて、タスクがプロデューサかコンシユーマになる。プロセッサ 間のデータ授受と同じように、タスク間のデータ授受の工夫次第で、システム全体の 効率が変わってくる。
発明の開示
発明が解決しょうとする課題
[0004] 本発明は上記事情に鑑みてなされたものであり、その目的は、複数の処理主体を 有しうるシステムにおいて、処理主体間でデータを授受するためのバッファを管理し て処理効率を向上させることができるバッファ管理技術を提供することにある。
課題を解決するための手段
[0005] 本発明に力かる第 1の態様は、複数のブロックに分けられ、それぞれのブロックが各 処理主体間で転送されるデータの一時的な格納場所として、データを書き込む側の 処理主体であるプロデューサと、プロデューサにより書き込まれたデータを読み出す 側の処理主体であるコンシユーマとによって所定の順序で循環使用されるバッファを 管理する方法である。この方法は、最も先に書込がなされるブロックに対して、該ブロ ックを示す先行ポインタと追尾ポインタを設け、使用中、書込完了、読出完了のいず れの状態にあるかをブロックに対応づけて示すブロック状態情報を保持する。そして 、最も先に書込がなされるブロックに対する書込の開始後、書込と読出の進行にした がって、ポインタの位置と、ブロック状態情報を更新する。
[0006] ポインタの進行については、 2つのポインタが同じ方向に進行し、かつ互いに追い 抜かない制約の下で、先行ポインタにより示されるブロックに対する書込の開始後、 次のブロックが読出完了状態にある場合に限り、先行ポインタを次のブロックに進め る。追尾ポインタにより示されるブロックに対する読出の開始後、次のブロックが書込 完了状態にある場合に限り、追尾ポインタを次のブロックに進める。
[0007] なお、本発明にお 、て、「処理主体」とは、データを処理する主体を意味し、一時的 な格納場所力 データを読み出して処理することが可能なもの、または処理したデー タを一時的な格納場所に書き込むことが可能なものである。この処理主体は、マルチ プロセッサシステムにおける各々のプロセッサに限らず、タスク、プロセス、スレッドな どを含むものである。
[0008] 本発明に力かる第 2の態様も、複数のブロックに分けられ、それぞれのブロックが各 処理主体間で転送されるデータの一時的な格納場所として、データを書き込む側の 処理主体であるプロデューサと、プロデューサにより書き込まれたデータを読み出す 側の処理主体であるコンシユーマとによって所定の順序で循環使用されるバッファを 管理する方法である。
[0009] この方法は、書込完了かそれ以外かをブロックに対応づけて示す書込完否情報と 、読出完了かそれ以外力をブロックに対応づけて示す読出完否情報とを含むブロッ ク状態情報を更新しながら保持する。
[0010] そして最も先に書込がなされるブロックに対して、該ブロックを示す第 1の先行ボイ ンタ、第 2の先行ポインタ、第 1の追尾ポインタ、第 2の追尾ポインタを設ける。すべて のポインタの進行方向が同じであり、かつ第 1の先行ポインタ、第 2の先行ポインタ、 第 1の追尾ポインタ、第 2の追尾ポインタの順で互いに追い抜かない制約の下で、ブ ロックに対する書込の開始後、該ブロックを示す前記第 1の先行ポインタを次のブロッ クに進める。そして第 2の先行ポインタにより示されるブロックの書込の完了後、第 2の 先行ポインタにより示されるブロック力 連続し、かつ書込完了状態にあるブロックのう ち、第 2の先行ポインタ力 最も離れたブロックの次のブロックに第 2の先行ポインタを 進める。また、ブロックに対する読出の開始後、該ブロックを示す第 1の追尾ポインタ を次のブロックに進める。そして第 2の追尾ポインタにより示されるブロックの読出の完 了後、第 2の追尾ポインタにより示されるブロック力 連続し、かつ読出完了状態にあ るブロックのうち、第 2の追尾ポインタから最も離れたブロックの次のブロックに第 2の 追尾ポインタを進める。
[0011] なお、以上の構成要素の任意の組合せ、本発明をシステム、プログラム、プログラム を記憶した記憶媒体として表現したものも、本発明の態様としては有効である。
発明の効果
[0012] 本発明は、マルチプロセッサや、マルチタスクなど、複数の処理主体を有しうるシス テムにおける処理主体間のデータの授受において有利である。
図面の簡単な説明
[0013] [図 1]本発明に力かる第 1の実施形態のマルチプロセッサシステムを示す図である。
[図 2]図 1に示すマルチプロセッサシステムの共有メモリを示す図である。
[図 3]図 2に示す共有メモリに設けられたバッファの初期状態を示す図である。
[図 4]図 2に示す共有メモリに保持されているビットマップの初期状態を示す図である
[図 5]ポインタの進行を説明するための図である。
[図 6]ポインタの進行およびビットマップ情報の更新を説明するための図である。
[図 7]ビットマップの各ビットのビット値とブロック状態の関係を示す図である。
[図 8]本発明に力かる第 2の実施形態のマルチプロセッサシステムを示す図である。
[図 9]図 8に示すマルチプロセッサシステムの共有メモリを示す図である。
[図 10]図 9に示す共有メモリに設けられたバッファの初期状態を示す図である。
[図 11]図 9に示す共有メモリに保持されている 2つのビット列の初期状態を示す図で ある。 [図 12]ポインタの進行およびビット列の更新を説明するための図(その 1)
[図 13]ポインタの進行およびビット列の更新を説明するための図(その 2)
[図 14]第 2の追尾ポインタにより示されるブロックの読出の完了後、第 2の追尾ポイン タの進め先の決定、およびビット列の更新を説明するための図である。
[図 15]第 2の追尾ポインタにより示されるブロックの読出の完了後に更新されたビット 列を示す図である。
[図 16]第 2の追尾ポインタが進められた後のノ ッファの状態とビット列を示す図である
[図 17]本発明の第 3の実施形態のマルチプロセッサシステムを示す図である。
[図 18]図 17に示すマルチプロセッサシステムの共有メモリを示す図である。
符号の説明
[0014] 10A…処理ユニット、 10B…処理ユニット、 12A…プロデューサ、 12Β· ··コン シユーマ、 14Α· ··ローカルメモリ、 14Β· ··ローカルメモリ 20· "バッファ、 30· ··ビ ットマップ、 44· ··先行ポインタ、 48· ··追尾ポインタ、 50· ··共有メモリ、 100· ··マ ルチプロセッサシステム、 110…処理ユニット、 112…プロセッサ、 114 ロー力 ルメモリ、 120· ··ノ ッファ、 130a…ビット列、 130b …ビット列、 144· ··第 1の先 行ポインタ、 145· ··第 2の先行ポインタ、 148…第 1の追尾ポインタ、 149· ··第 2 の追尾ポインタ、 150· ··共有メモリ、 200· ··マルチプロセッサシステム、 210· ··処 理ュニット、 212· ··プロセッサ、 214· ··ローカルメモリ、 220· ··バッファ、 230· ·· ビット列、 240· ··ポインタキュー、 250…共有メモリ。
発明を実施するための最良の形態
[0015] はじめに本実施の形態について概要を述べ、その後、各図を参照しながら詳細を 述べ。。
[0016] 本発明に力かる第 1の態様は、複数のブロックに分けられ、それぞれのブロックが各 処理主体間で転送されるデータの一時的な格納場所として、データを書き込む側の 処理主体であるプロデューサと、プロデューサにより書き込まれたデータを読み出す 側の処理主体であるコンシユーマとによって所定の順序で循環使用されるバッファを 管理する方法である。この方法は、最も先に書込がなされるブロックに対して、該ブロ ックを示す先行ポインタと追尾ポインタを設け、使用中、書込完了、読出完了のいず れの状態にあるかをブロックに対応づけて示すブロック状態情報を保持する。そして 、最も先に書込がなされるブロックに対する書込の開始後、書込と読出の進行にした がって、ポインタの位置と、ブロック状態情報を更新する。
[0017] ポインタの進行については、 2つのポインタが同じ方向に進行し、かつ互いに追い 抜かない制約の下で、先行ポインタにより示されるブロックに対する書込の開始後、 次のブロックが読出完了状態にある場合に限り、先行ポインタを次のブロックに進め る。追尾ポインタにより示されるブロックに対する読出の開始後、次のブロックが書込 完了状態にある場合に限り、追尾ポインタを次のブロックに進める。
[0018] なお、本発明において、「処理主体」とは、データを処理する主体を意味し、一時的 な格納場所力 データを読み出して処理することが可能なもの、または処理したデー タを一時的な格納場所に書き込むことが可能なものである。この処理主体は、マルチ プロセッサシステムにおける各々のプロセッサに限らず、タスク、プロセス、スレッドな どを含むものである。
[0019] 以下の説明において、この方法を第 1の方法という。
[0020] 複数の処理主体を有しうるシステムにおいて、各処理主体間のデータ授受にバッフ ァを利用する方法が考えられる。ノ ッファを用いれば、プロデューサは、処理が完了 したデータをバッファに書き込み、コンシユーマは、ノ ッファカもデータを読み出して 処理することができるため、システム全体の処理効率の向上を図れる。
[0021] このようなバッファの管理において、データを保護するために、 1つの処理主体がバ ッファを使用しているとき、バッファはほかの処理主体により修正されることがないよう に、バッファをロックする方法が考えられる。し力し、バッファがロックされてしまっては 、バッファの中には、プロデューサによる書込が完了したデータがある場合でも、コン シユーマはロックが解除されるまでそのデータを読み出すことができない。プロデュー サについても同じぐノ ッファがロックされているときに、バッファの中には、データを 書込ことができるブロックがある場合においても、このプロデューサはロックが解除さ れるまで待たなければならな 、。複数の処理主体が同時にバッファを使用すること、 すなわちマルチアクセスができれば、システムの処理効率が一層向上すると考えられ る。
[0022] 本発明の第 1の方法は、所定の順序で循環使用される複数のブロックを有するバッ ファに対して、安全なマルチアクセスを実現する。この方法は、使用中か、書込完了 力 読出完了かのいずれかを示すブロック状態情報を更新しながら保持するとともに 、先行ポインタと追尾ポインタが同じ方向に進行し、かつ互いに追い抜かない制約の 下で先行ポインタと追尾ポインタを進める。
[0023] ここで、ブロック状態情報の保持は、マルチアクセスを実現するうえで大きな利益を もたらす。
[0024] 先行ポインタについては、先行ポインタにより示されているブロックに対する書込の 開始後、次のブロックが読出完了状態にある場合に限り、先行ポインタを次のブロッ クに進める。ここで、先行ポインタを進行するタイミングは、システムの設計に委ねる。
[0025] たとえば、先行ポインタにより示されているブロックに対する書込の開始時に、次の ブロックが既に読出完了状態にあれば、書込の開始と共に先行ポインタを次のブロッ クに進める。その一方、先行ポインタにより示されているブロックに対する書込の開始 時に、次のブロックがまだ読出完了状態ではなければ、書込の開始後に、次のブロッ クが読出完了状態になった時点で先行ポインタを次のブロックに進めるシステムが考 えられる。この場合、先行ポインタにより示されるブロック力 読出完了状態と、最後に 書込が開始されたブロックが書込中であることを示す使用中状態と、このブロックの書 込が完了したことを示す書込完了状態のいずれかにある。次のプロデューサが先行 ポインタを見い出して、このブロックが読出完了状態にある力否かを確認し、読出完 了状態にあれば書込を行うことができる。
[0026] これに対してより単純なシステムとして、先行ポインタは最後に書込が開始されたブ ロックを示すようにし、次のプロデューサが先行ポインタを見い出すとともに、先行ボイ ンタにより示されるブロックの次のブロックが読出完了状態にある力否かを確認し、読 出完了状態にあれば、先行ポインタを次のブロックに進めるとともに、次のブロックに 対する書込を開始するシステムが考えられる。
[0027] いずれのシステムでも、プロデューサによる書込中であっても、他のプロデューサは 、先行ポインタと、ブロック状態情報とに基づいて、ほかのブロックの安全な書込を行 うことができる。
[0028] コンシユーマについて同じ状況であり、追尾ポインタとブロック状態情報の併用によ つて、ノ ッファをロックせずに複数のコンシユーマの同時読出が安全にできる。
[0029] これによつて、処理主体による安全なマルチアクセスを実現することができる。
[0030] 本発明にかかる第 2の態様も、複数のブロックに分けられ、それぞれのブロックが各 処理主体間で転送されるデータの一時的な格納場所として、データを書き込む側の 処理主体であるプロデューサと、プロデューサにより書き込まれたデータを読み出す 側の処理主体であるコンシユーマとによって所定の順序で循環使用されるバッファを 管理する方法である。この方法も、安全なマルチアクセスを実現するものであり、以下 において、この方法を第 2の方法という。
[0031] この第 2の方法は、プロデューサが書込を行うべきブロックの指定、コンシユーマが 読出を行うべきブロックの指定については、第 1の方法と同じように、先行ポインタと 追尾ポインタを用いる。ここで、後述する第 2の先行ポインタと第 2の追尾ポインタとを 区別するために、第 1の方法における先行ポインタと追尾ポインタと同じ役割を担う先 行ポインタと追尾ポインタを、それぞれ第 1の先行ポインタと第 1の追尾ポインタと呼
[0032] 第 2の方法は、最も先に書込がなされるブロックに対して、該ブロックを示す第 1の 先行ポインタ、第 2の先行ポインタ、第 1の追尾ポインタ、第 2の追尾ポインタを設け、 書込完了かそれ以外か、読出完了かそれ以外力をブロックに対応づけて示すブロッ ク状態情報を保持する。そして、最も先に書込がなされるブロックに対する書込の開 始後、書込と読出の進行にしたがって、ポインタの位置と、ブロック状態情報を更新 する。
[0033] 第 2の先行ポインタは、第 1の先行ポインタに追従し、それにより示されるブロックに 対する書込が終了した後、先に進めるポインタである。
[0034] 第 2の追尾ポインタは、第 1の追尾ポインタに追従し、それにより示されるブロックに 対する読出が完了した後、先に進めるポインタである。
[0035] また、第 2の方法において、この 4つのポインタは、第 1の先行ポインタ、第 2の先行 ポインタ、第 1の追尾ポインタ、第 2の追尾ポインタの順で、進行方向が同じ、かつ互 ヽに追 、抜かな 、制約の下で進められる。
[0036] すなわち、この第 2の方法によれば、ポインタの進行方向に沿って、第 1の追尾ボイ ンタと第 2の先行ポインタとの間のブロックは、書込完了状態にあるブロックであり、第 1の先行ポインタと第 2の追尾ポインタとの間のブロックは、読出完了状態にあるプロ ックである。
[0037] これによつて、第 1の先行ポインタを先に進める際に、第 2の追尾ポインタまでのブ ロックが書込完了状態にあるブロックであるので、進め先のブロックが書込完了してい る力否かを確認する必要がない。同じように、第 1の追尾ポインタを先に進める際に、 第 2の先行ポインタまでのブロックが読出完了状態にあるブロックであるので、進め先 のブロックが読出完了して 、る力否かを確認する必要がな!、。
[0038] すなわち、第 1の先行ポインタ、第 2の追尾ポインタを用いることによって、書込を行 うべきブロックを示すとともに、バッファをロックせずに、読出中のデータを保護するこ とがでさる。
[0039] コンシユーマについても同じ状況であり、第 1の追尾ポインタ、第 2の先行ポインタを 用いることによって、コンシユーマが読出を行うべきブロックを示すとともに、バッファを ロックせずに、書込中のデータを保護することができる。
[0040] ここで、第 2の先行ポインタと第 2の追尾ポインタの進め先について考える。
[0041] 第 2の先行ポインタは、それによつて示されるブロックに対する書込の完了後に進め られるポインタである。第 2の先行ポインタ力も第 1の先行ポインタまでの間、書込中 のブロックと、書込が完了したブロックがあり、第 1の先行ポインタ力 離れたブロック ほど、書込が早く開始されている。第 2の先行ポインタと第 1の先行ポインタにより示さ れるブロックがそれぞれ Aブロックと Fブロックであり、その間には、ポインタの進行方 向に沿って配列されている B、 C、 D、 Eの 4つのブロックがある場合を例にする。この 6つのブロックの書込開始順は、 A、 B、 C、 D、 E、 Fとなっている。
[0042] 先に書込が開始されたブロックは、先に書込が完了されるとは限らない。たとえば、 第 2の先行ポインタにより示される Aブロックの書込中に、 Bブロックと Cブロックの書込 が完了する場合がある。 Aブロックの書込が完了したとき、第 2の先行ポインタを次に ブロック(Bブロック)に進むだけでは、 Cブロックは既に書込が完了したのに、コンシュ 一マによる使用ができな 、。
[0043] そこで、本発明の第 2の方法は、ブロック状態情報に含まれ、書込完了か否かを示 す情報を保持することによって、 Aブロックの書込が完了したとき、書込完了か否かを 示す情報を参照して、第 2の先行ポインタにより示されるブロック (ここの例では Aプロ ック)力 連続し、かつ読出完了状態にあるブロック (ここの例では Bブロックと Cブロッ ク)のうち、第 2の追尾ポインタ力も最も離れたブロック(Cブロック)の次のブロック(D ブロック)に進める。これによつて、ブロックの書込が開始順通りに完了しない場合に おいても、第 2の先行ポインタを、進めることが可能な範囲内の最も先のブロックに進 めることができるので、書込が完了したブロックを早くコンシユーマに供することができ る。
[0044] 第 2の追尾ポインタにおいても同じであり、読出完了カゝ否かを示す情報を保持する ことによって、ブロックの読出が開始順通りに完了しない場合においても、第 2の追尾 ポインタを最も先のブロックに進めることができるので、読出が完了したブロックを早く プロデューサに供することができる。
[0045] さらに、書込完了したか否かを示す情報がなければ、プロデューサは、書込が完了 しても、処理を終了することができない場合がある。たとえば、上記の例では Bブロッ クに対する書込を行うプロデューサは、書込が完了しても、第 2の先行ポインタを進め るために、 Aブロックの書込が完了し、第 2の先行ポインタが Bブロックに進められてく るまで、処理を終了することができない。 Cブロックのプロデューサも同じである。これ では、 Bブロック、 Cブロックのプロデューサは、書込が完了しても処理済みのデータ を手放すことができな 、ので、システムの処理効率が低下する。
[0046] ここで、本発明の第 2の方法のように、書込完了した力否かを示す情報を設けること によって、書込が完了したプロデューサたとえば Bブロックのプロデューサ力 書込完 了時にこの情報を更新すれば、 Aブロックのプロデューサは、情報を参照して第 2の 先頭ポインタを進めることができるので、 Bブロックのプロデューサは、 Aブロックの書 込完了を待つ必要がなぐ書込が完了次第、処理を終了することができる。
[0047] 読出についても同じ状況である。
[0048] 以上の説明の通り、本発明の第 2の方法も、安全なマルチアクセスを実現すること ができる。また、書込または読出が開始順通りに完了しなくても、システムの処理効率 の低下を防ぐことができる。
[0049] 図 1は、本発明の第 1の実施形態となるマルチプロセッサシステム 100の構成を示 す。マルチプロセッサシステム 100は、複数の処理ユニット 10A、複数の処理ユニット 10Bと、共有メモリ 50とを有し、各処理ユニットは、共有メモリ 50に接続されている。
[0050] マルチプロセッサシステムにお 、て、各々のプロセッサがそれぞれの処理ユニット に含まれる形で存在する。これらの処理ュニットは主処理ュニットとサブ処理ュニット とに分けることができる。サブ処理ユニットのすべてが同一のアーキテクチャを用いて 実現されてもよぐそれぞれ異なる構成を有してもよい。主処理ユニットは、サブ処理 ユニットに対してローカルに、たとえばサブ処理ユニットと同一のチップ、同一のパッ ケージ、同一の回路基板、同一の製品に位置してもよいし、サブ処理ユニットに対し てリモートに、たとえばバスやインターネットなどの通信ネットワークを介して接続可能 な異なる製品に位置してもよい。同様に、サブ処理ユニットは、互いにローカルにまた はリモートに位置してもよい。
[0051] 図 1に示すマルチプロセッサシステム 100における複数の処理ユニット 10A、処理 ユニット 10Bには、主処理ユニットが含まれてもよい。
[0052] 各処理ユニット 10Aは、プロセッサ 12A、ローカルメモリ 14Aを有し、各処理ユニット 10Bは、プロセッサ 12B、ローカルメモリ 14Bを有する。プロセッサ 12Aは、ローカル メモリ 14Aに対してデータを読み書きすることができ、プロセッサ 12Bは、ローカルメ モリ 14Bに対してデータを読み書きすることができる。
[0053] マルチプロセッサシステム 100は、ストリームデータの転送に関するシステムであり、 各処理ユニット 10Aは、所定の転送単位のストリームデータ(以下、単にデータという )を、共有メモリ 50に設けられた、後述するバッファ 20に書き込む。各処理ユニット 10 Bは、処理ユニット 10Aにより書き込まれたデータを読み出して転送する。ここで、処 理ユニット 10Aは、データをバッファ 20に書き込む側であるので、プロセッサ 12Aは プロデューサとなる。処理ユニット 10Bは、データを読み出す側になるので、プロセッ サ 12Bは、コンシユーマである。
[0054] 処理ユニット 10Aまたは処理ユニット 10Bのうちのいずれ力 1つは、バッファ 20の使 用に関して他の処理ユニットに対するサービスユニットの役割を担う。サービスュ-ッ トの役割としては、たとえばバッファ 20の初期状態の設定や、後述するポインタの初 期設置などである。なお、このサービスユニットは、いずれの処理ユニットによって担 当されてもよい。処理ユニット 10Aまたは処理ユニット 10Bのうちに主処理ユニットが ある場合には、このサービスユニットは、主処理ユニットによって担当されることが好ま しいが、それに限定することがない。
[0055] 図 2は、共有メモリ 50を示す。共有メモリ 50は、バッファ 20と、ビットマップ 30を有し 、 ノッファ 20に対して、先行ポインタ 44と追尾ポインタ 48が設けられている。
[0056] 図 3は、バッファ 20を示す。ノッファ 20は、連続した複数のブロックに分けられてお り、それぞれのブロックは所定の順序たとえば図中矢印 Lにより示される順序で順次 循環使用される。ここで、最も先に書込がなされるブロックは図 3に示す 0番のブロック であり、先行ポインタ 44と追尾ポインタ 48は、各ブロックが循環使用されるときに、 0 番のブロックより 1つ先に使用されるブロック(図中 n番のブロック)を初期位置とする。
[0057] なお、最も先にどのブロック力 書込を開始する力 ポインタの設置、ポインタの初 期位置の決定などは、サービスユニットによって行われる。
[0058] 図 4は、初期状態におけるビットマップ 30を示す。図示のように、ビットマップ 30は、 それぞれバッファ 20の各ブロックに 1ビットを割り当てたビット列 30aとビット列 30bとを 有し、ブロックが使用中(書込中または読出中)か、書込完了か、読出完了かを示す ブロック状態情報である。
[0059] また、図 4に示すように、ビット列 30aの各ビットの初期値が 1であり、ビット列 30bの 各ビットの初期値が 0である。
[0060] 図 5は、いずれかのプロデューサ 12Aが、ストリームデータをバッファ 20に書き込む のに当たり、先行ポインタ 44を移動する処理を示す図である。このプロデューサ 12A は、まず、バッファ 20における先行ポインタ 44を検索する。先行ポインタ 44は、 n番 のブロックを示しているので、プロデューサ 12Aは、ビット列 30aを参照し、 n番のブ口 ックの次のブロック、すなわち 0番のブロックに対応するブロックの値を確認する。ここ で、 0番のブロックに対応するビットの値が初期値の 1であるので、プロデューサ 12A は、先行ポインタ 44を 0番のブロックに進めて、 0番に対する書込を開始するとともに 、ビット列 30aにおける、 0番のブロックに対応するビットの値を 0に変更する。
[0061] このとき、ほかのいずれかのプロデューサ 12A力 書込を行う準備ができた場合、こ のプロデューサ 12Aも、まずバッファ 20における先行ポインタ 44を検索する。 0番目 のブロックの位置に先行ポインタ 44があるので、このプロデューサは、ビット列 30aを 参照し、 1番目のブロックに対応するビットの値が 1であるので、先行ポインタ 44を 1番 目のブロックに進め、 1番目のブロックに対して書込を開始するとともに、ビット列 30a における、 1番目のブロックに対応するビットの値を 0に変更する。
[0062] 同じように、書込を行う準備ができたほかののプロデューサ 12Aも、先行ポインタ 44 を 2番目のブロックに進め、 2番目のブロックに対して書込を開始するとともに、ビット 列 30aにおける、 2番目のブロックに対応するビットの値を 0に変更する処理を行うこと ができる。
[0063] また、いずれかのブロックに対する書込が完了すれば、この書込を行ったプロデュ ーサ 12Aは、ビット列 30bにおける、このブロックに対応するビットの値を 1に変更する 。ここで、 0番と 2番のブロックに対する書込が完了し、ビット列 30bにおける、 0番と 2 番のブロックに対応するビットの値が 1に変更されたとする。
[0064] いずれかのコンシユーマ 12Bは、読出を開始するのに当たり、まず、バッファ 20に おける追尾ポインタ 48を検索する。初期状態では、追尾先行ポインタ 48は、 n番のブ ロックを示しているので、コンシユーマ 12Bは、ビット列 30bを参照し、 n番のブロック の次のブロック、すなわち 0番のブロックに対応するブロックの値を確認する。ここで、 0番のブロックに対応するビットの値が 0であれば、 0番のブロックがまだ書込がなされ ていない初期状態か書込中かを示し、ビットの値が 1であれば、 0番のブロックが書込 が完了されていることを示す。コンシユーマ 12Bは、ビット列 30bにおける、 0番のブ口 ックに対応するビットの値が 1である場合に限り、追尾ポインタ 48を 0番ブロックに進め 、 0番のブロックに対する読出を開始するとともに、ビット列 30bにおける、 0番のブロッ クに対応するビットの値を 0に変更する。
[0065] 図 6は、このときのバッファ 20の状態およびビット列 30aと 30bを示す。図示のように 、この時点において、先行ポインタ 44は最後に書込を開始した 2番のブロックを示し、 追尾ポインタ 48は、最後に読出を開始した 0番のブロックを示す。 0番、 1番のブロッ クは使用中であり、 2番のブロックは書込完了状態にある。この状態は、ビット列 30aと ビット列 30bから読み取ることができ、これにつ ヽては後述する。
[0066] その後、プロデューサ 12Aとコンシユーマ 12Bによる書込と読出が繰り返され、書込 と読出の進行にしたがって、先行ポインタ 44と追尾ポインタ 48の位置、ビット列 30aと ビット列 30bは更新される。
[0067] ビット列 30aの更新について、具体的には、ブロックに対する読出が完了すれば、こ のブロックのビット値は、読出を行ったコンシユーマ 12Bにより 1にセットされる。そして 、このブロックに対する書込が開始すれば、そのビット値は、書込を開始したプロデュ ーサ 12Aにより 0にリセットされる。
[0068] ビット列 30bの更新について、具体的には、ブロックに対する書込が完了すれば、こ のブロックのビット値は、書込を行ったプロデューサ 12Aにより 1にセットされる。そし て、このブロックに対する読出が開始すれば、そのビット値は、読出を開始したプロデ ユーサにより 0にリセットされる。
[0069] これによつて、ビット列 30aのビット値とビット列 30bのビット値により、図 7に示すよう に、ビットに対応するブロックは、使用中、書込完了、読出完了のいずれの状態にあ るかを示すことができる。
[0070] また、先行ポインタ 44は、最後に書込が開始されたブロックを示し、プロデューサ 1 2Aは、書込をするのにあたって、バッファ 20から先行ポインタ 44を検索するとともに 、ビット列 30aを参照して、先行ポインタ 44により示されるブロックの次のブロックが読 出完了状態にあるか否かを確認する。ビット列 30aにおけるこのブロックのビットの値 力 であり、すなわちこのブロックが読出完了状態にあれば、先行ポインタ 44をこのブ ロックに進めて書込を開始するとともに、ビット列 30aのこのブロックに対応するビット の値を 0にリセットする。
[0071] 追尾ポインタ 48は、最後に読出が開始されたブロックを示し、コンシユーマ 12Bは、 読出をするのにあたって、ノ ッファ 20から追尾ポインタ 48を検索するとともに、ビット 列 30bを参照し、追尾ポインタ 48により示されるブロックの次のブロックが書込完了状 態にあるか否かを確認する。ビット列 30bにおけるこのブロックのビットの値が 1であり 、すなわちこのブロックが書込完了状態にあれば、追尾ポインタをこのブロックに進め て読出を開始するとともに、ビット列 30bにこのブロックに対応するビットの値を 0にリ セットする。
[0072] なお、プロデューサ 12Aとコンシユーマ 12Bは、 2つのポインタが同じ方向に進行し 、互いに追!、ぬかな!/、と!/、う制約の下でポインタの進行を行う。
[0073] このように、図 1に示すマルチプロセッサシステム 100によれば、ビットマップ 30と 2 つのポインタとを併用することによって、安全なマルチアクセスを実現することができ る。
[0074] 図 8は、発明の第 2の実施形態となるマルチプロセッサシステム 200の構成を示す。
マルチプロセッサシステム 200は、複数の処理ユニット 110と、共有メモリ 150をと有 し、各処理ユニット 110は、共有メモリ 150に接続されている。マルチプロセッサシス テム 200における複数の処理ユニット 110には、主処理ユニットが含まれてもよい。
[0075] 各処理ユニット 110は、プロセッサ 112、ローカルメモリ 114を有する。プロセッサ 11 2は、ローカルメモリ 114に対してデータを読み書きすることができる。
[0076] マルチプロセッサシステム 200は、各処理ユニット 110が並列に処理を行い、それ ぞれのプロセッサ 112は、処理したデータを、後述するバッファ 120に書き込むととも に、書き込んだ後には、ノッファ 120から、ほかの処理ユニット 110により書き込まれ たデータを自分のローカルメモリ 114にコピーして処理を行う。すなわち、処理ュ-ッ ト 110に含まれるプロセッサ 112は、プロデューサとコンシユーマのいずれにもなりうる 。以下の説明において、同じプロセッサでも、データを書き込む側であるか読み出す 側であるかによって、それをプロデューサまたはコンシユーマという。
[0077] 処理ユニット 110うちのいずれ力 1つは、バッファ 120の使用に関して他の処理ュ- ットに対するサービスユニットの役割を担う。サービスユニットの役割としては、たとえ ばバッファ 120の初期状態の設定や、後述するポインタの初期設置などである。なお 、このサービスユニットは、いずれの処理ユニットによって担当されてもよい。処理ュ ニット 110のうちに主処理ユニットがある場合には、このサービスユニットは、主処理 ユニットによって担当されることが好ましいが、それに限定することがない。
[0078] 図 9は、共有メモリ 150を示す。共有メモリ 150は、ノ ッファ 120と、ビット列 130aお よびビット列 130bを有し、バッファ 120に対して、第 1の先行ポインタ 144、第 2の先 行ポインタ 145、第 1の追尾ポインタ 148、第 2の追尾ポインタ 149が設けられている 。なお、ビット列 130aは、同時にアクセス可能なプロデューサの数の分のビット幅を 有し、ビット列 130bは、同時にアクセス可能なコンシユーマの数の分のビット幅を有 する。ここで、例として、 8つの処理ユニット 110があるとする。それぞれのプロセッサ 1 12はプロデューサとコンシユーマのいずれにもなりうるので、ここで、ビット列 130aと ビット列 130bのビット幅は 8ビットとなる。
[0079] 図 10は、バッファ 120を示す。ノ ッファ 120は、連続した複数のブロックに分けられ ており、それぞれのブロックは所定の順序たとえば図中矢印 Lにより示される順序で 順次循環使用される。ここで、最も先に書込がなされるブロックは図 10に示す 0番の ブロックであり、すべてのポインタは、各ブロックが循環使用されるときに、 0番のブ口 ックより 1つ先に使用されるブロック(図中 n番のブロック)を初期位置とする。
[0080] なお、最も先にどのブロック力 書込を開始する力 ポインタの設置、ポインタの初 期位置の決定などは、サービスユニットによって行われる。
[0081] ビット列 130aの各ビットは、その値が 1であるときに、該ビットに対応するブロックが 書込完了状態にあることを示し、その値力^であるときに、該ビットに対応するブロック が書込完了状態以外の状態にあることを示す。
[0082] ビット列 130bの各ビットは、その値が 1であるときに、該ビットに対応するブロックが 読出完了状態にあることを示し、その値力^であるときに、該ビットに対応するブロック が読出完了状態以外の状態にあることを示す。
[0083] 図 11は、初期状態におけるビット列 130aとビット列 130bを示す。図示のように、 2 つのビット列とも、初期状態にお!、て各ビットの値が 0となって 、る。
[0084] 図 12は、いずれかの処理ユニット 110により書込を開始する前に、サービスユニット が行う処理を示す図である。図示のように、サービスユニットは、いずれかの処理ュ- ットがデータをバッファ 120に書き込むのに先立って、第 1の先行ポインタ 144と第 2 の先行ポインタ 145を初期位置の n番ブロックから、先頭の 0番のブロックに移動する とともに、ビット列 130aの各ビットは、 0番のブロックから 7番のブロックまで計 8個のブ ロックに割り当てる。
[0085] ここで、いずれかのプロデューサ 112は、データの書込を行うために、まず、バッフ ァ 120における第 1の先行ポインタ 144を検索する。この場合、第 1の先行ポインタ 14 4が 0番のブロックを示しているので、プロデューサ 112は、自分のローカルメモリ 114 力 0番のブロックにデータをコピーすることによって、書込を行う。また、 0番のブロッ クに対する書込の開始に伴って、このプロデューサ 112は、第 1の先行ポインタ 144 を次のブロック、すなわち 1番のブロックに進める。
[0086] このとき、ほかのいずれかのプロデューサ 112は、書込を行う準備ができた場合、こ のプロデューサ 112も、まずバッファ 120における第 1の先行ポインタ 144を検索する 。 1番目のブロックの位置に第 1の先行ポインタ 144があるので、このプロデューサ 11 2は 1番目のブロックに対して書込を開始するとともに、第 1の先行ポインタ 144を次 のブロック、すなわち 2番のブロックに進める。このときの各ポインタの位置、ビット列 1 30aの各ビットの値を図 13に示す。第 1の先行ポインタ 144は、 2番のブロックにあり、 第 2の先行ポインタ 145は、 0番のブロックにある。ビット列 130aの各ビットの値は、 0 のままであり、 0番のブロックから 7番のブロックまで、書込が完了したブロックがないこ とを示している。
[0087] 0番のブロックに対する書込が完了した際に、書込を行ったプロデューサ 112は、 第 2の先行ポインタ 145を進める。その進め先については後述する。また、第 2の先 行ポインタ 145を進めるとともに、ビット列 130aを、進め先のブロック力も連続した 8個 のブロックに割り当てる。
[0088] サービスユニットは、ビット列 130aにおいて、 0番のブロックのビットの値が 1にセット されると、第 1の追尾ポインタ 148と第 2の追尾ポインタ 149を 0番のブロックに移動す るとともに、ビット列 130bの各ビットを、 0番のブロックから 7番のブロックまで計 8個の ブロックに割り当てる。これをもって、バッファ 120の管理は各処理ユニットに任せられ る。
[0089] その後、プロデューサ 112とコンシユーマ 112による書込と読出が繰り返され、書込 と読出の進行にしたがって、 4つのポインタの位置、ビット列 130aとビット列 130bは 更新される。なお、以下の説明において、プロデューサ 112とコンシユーマ 112は、 4 つのポインタの進行方向が同じであり、第 1の先行ポインタ 144、第 2の先行ポインタ 145,第 1の追尾ポインタ 148、第 2の追尾ポインタ 149の順で互いに追い抜かない 制約の下でポインタを進めるようにして 、る。
[0090] プロデューサ 112は、データの書込を行うのにあたって、バッファ 120において第 1 の先行ポインタ 144を検索して、第 1の先行ポインタ 144により示されるブロックに対 して書込を行う。また、書込の開始に伴って、第 1の先行ポインタ 144を次のブロック に進める。
[0091] 第 2の先行ポインタ 145により示されるブロック以外のブロックに対する書込が終了 したとき、この書込を行ったプロデューサ 112は、ビット列 130aにおいて、対応するビ ットの値を 1にセットして処理を終了する。
[0092] コンシユーマ 112は、データの読出を行うのにあたって、バッファ 120において第 1 の追尾ポインタ 148を検索して、第 1の追尾ポインタ 148により示されるブロックに対 して読出を行う。また、読出の開始に伴って、第 1の追尾ポインタ 148を次のブロック に進める。
[0093] 第 2の追尾ポインタ 149により示されるブロック以外のブロックに対する読出が終了 したとき、この読出を行ったコンシユーマ 112は、ビット列 130bにおいて、対応するビ ットの値を 1にセットして処理を終了する。
[0094] 第 2の先行ポインタ 145は、このポインタにより示されるブロックの書込の終了後に 進められるポインタであり、第 2の追尾ポインタ 149は、このポインタにより示されるブ ロックの読出の終了後に進められるポインタである。ここで、図 14の状態を例にして、 第 2の追尾ポインタ 149により示されるブロックの読出が終了時に、コンシユーマ 112 が行う処理にっ 、て説明する。
[0095] 図 14の例では、第 1の先行ポインタ 144は、 9番のブロックまで進められており、第 2 の先行ポインタ 145は、 17番のブロックまで進められている。第 1の追尾ポインタ 148 は、 15番のブロックまで進められており、 14番までのブロックに対して読出が開始さ れていることを示す。第 2の追尾ポインタ 149は、 11番のブロックまで進められており 、 10番までのブロックの読出が完了されていることを示す。
[0096] ここで、 11番から 14番までの 4つのブロックは、既に読出が開始されている力 いず れもまだ完了していないとする。ビット列 130bは、 11番からの 8つのブロックに対して 割り当てられており、すべてのビットの値が 0である。ビット列 130bは、第 2の追尾ポィ ンタ 149の進め先を決定するためのものであり、第 2の追尾ポインタは第 1の追尾ボイ ンタ 148を追い抜くことがないので、第 1の追尾ポインタより先のブロックのビットにつ いては値を全部 0にする。
[0097] 11番から 14番までの 4つのブロックは、読出の開始順が 11、 12、 13、 14となって いる。しかし、終了順は必ずしも開始順通りではない。ここで、読出の終了順を 13、 1 2、 11、 14に仮定する。
[0098] 11番、 12番、 14番のブロックの読出中に、 13番のブロックに対する読出が完了す ると、読出を行ったコンシユーマ 112は、ビット列 130bにおける、 13番のブロックに対 応するビット(この例では 3番のビット)の値を 1にセットして処理を終了する。
[0099] 12番のブロックのコンシユーマ 112も、読出が完了すると、ビット列 130bにおける、 12番のブロックに対応するビット(ここでは 2番のビット)の値を 1にセットして処理を終 了する。
[0100] その後、 11番のブロックの読出が完了する。 11番のブロックが第 2の追尾ポインタ 1 49により示されているので、 11番の読出を行ったコンシユーマ 112は、ビット列 130b における、 11番に対応するビット(1番のビット)の値を 1にセットするとともに、第 2の 先行ポインタの進め先を決めて進める。
[0101] このときのビット列 130bの各ビットは、図 15に示すように、読出が完了したブロック、 11番、 12番、 13番の 3つのブロックに対応するビットの値は 1であり、そのほかのビッ トの値は 0である。
[0102] 進め先を決めるのにあたって、コンシユーマ 112は、アトミックコマンドたとえば clzを 用いて、ビット列 130bの先頭ビットを起点として、 1の値が続いたビットの数を求める。 図 15に示す例では、 3という結果が得られる。コンシユーマ 112は、得られた結果の 分、第 2の追尾ポインタ 149を進める。図 14に示す例では、第 2の追尾ポインタ 149 は、 11番のブロック力ら 14番のブロックに進められる。
[0103] さらに、このコンシユーマ 112は、第 2の追尾ポインタ 149を進めた後に、ビット列 13 Obを、第 2の追尾ポインタ 149の現在位置からの 8個のブロックに割り当て、処理を終 了する。
[0104] すなわち、第 2の追尾ポインタ 149により示されるブロックの読出の完了時、読出を 行ったコンシユーマ 112は、ビット列 132bにおける、このブロックに対応するビットの 値を 1にセットするとともに、第 2の追尾ポインタ 149により示されるブロック力も連続し 、かつ読出完了状態にあるブロックのうち、第 2の追尾ポインタ力も最も離れたブロッ クの次のブロックに第 2の追尾ポインタ 149を進める。そして、ビット列 130bを、第 2の 追尾ポインタ 149の現在位置からの 8個のブロックに割り当てる。
[0105] 図 16は、このときにおけるポインタの位置、ビット列 130bを示している。第 2の追尾 ポインタ 149は 14番のブロックに進められており、ビット列 130bは、 14番からの 8つ のブロックに対して割り当てられて 、る。
[0106] 第 2の先行ポインタ 145についても同じである。第 2の先行ポインタ 145により示され るブロックの書込の完了時、書込を行ったプロデューサ 112は、ビット列 132aにおけ る、このブロックに対応するビットの値を 1にセットするとともに、第 2の先行ポインタ 14 5により示されるブロック力も連続し、かつ書込完了状態にあるブロックのうち、第 2の 先行ポインタ 145から最も離れたブロックの次のブロックに第 2の先行ポインタ 145を 進める。そして、ビット列 130aを、第 2の先行ポインタ 145の現在位置からの 8個のブ ロックに割り当てて処理を終了する。
[0107] このように、図 8に示すマルチプロセッサシステム 200によれば、 4つのポインタと 2 つのビット列を用い、書込と読出の進行にしたがって、ポインタの位置とビット列を更 新する。これによつて、ノ ッファをロックせずに、安全なマルチアクセスを実現している 。さらに、書込または読出の完了順は開始順通りに完了しない場合でも、システムの 効率低下を防ぐことができる。
[0108] また、書込が完了したかそれ以外かを示す情報 (ビット列 130a)を、第 2の先行ボイ ンタ 145から連続した 8個のブロックに対してのみ保持することによって、第 2の先行 ポインタ 145を進める際に必要な情報を提供することができるとともに、ビット列 130a のビット幅を減らすことができる。ビット列 130bについても同じである。これも、システ ムの処理効率の向上に貢献する。
[0109] さらに、第 2の先行ポインタ 145を進める際に、ビット列 130aのみを必要とし、第 2 の追尾ポインタ 149を進める際に、ビット列 130bのみを必要とする。ここで、ビット列 1 30aとビット列 130bとを別々に保持することによって、第 2の先行ポインタ 145を進め る際に、プロデューサは、ビット列 130aのみを有する領域を参照し、第 2の追尾ボイ ンタ 149を進める際に、コンシユーマは、ビット列 130bのみを有する領域を参照する ことになるので、処理が簡単である。
[0110] なお、この第 2の実施形態に用いられたバッファの管理方法は、図 8に示すようなマ ルチプロセッサシステムにのみならず、図 1に示すようなストリームデータを転送する ためのマルチプロセッサシステムなど、プロセッサ間でデータを授受する!、かなるマ ルチプロセッサシステムに適用してもょ 、。
[0111] 図 17は、本発明の第 3の実施形態となるマルチプロセッサシステム 300を示す。
[0112] マルチプロセッサシステム 300は、複数の処理ユニット 210と、共有メモリ 250とを有 し、各処理ユニット 210は、共有メモリ 250に接続されている。マルチプロセッサシス テム 300における複数の処理ユニット 210には、主処理ユニットが含まれてもよい。
[0113] 各処理ユニット 210は、プロセッサ 212、ローカルメモリ 214を有する。プロセッサ 21 2は、ローカルメモリ 214に対してデータを読み書きすることができる。
[0114] マルチプロセッサシステム 300は、各処理ユニット 210が並列に処理を行い、それ ぞれのプロセッサ 212は、処理したデータを、後述するバッファ 220に書き込むととも に、書き込んだ後には、ノッファ 220から、ほかの処理ユニット 210により書き込まれ たデータを自分のローカルメモリ 214にコピーして処理を行う。すなわち、処理ュ-ッ ト 210に含まれるプロセッサ 212は、プロデューサとコンシユーマのいずれにもなりうる 。以下の説明において、同じプロセッサでも、データを書き込む側であるか読み出す 側であるかによって、それをプロデューサまたはコンシユーマという。
[0115] 処理ユニット 210うちのいずれ力 1つは、バッファ 220の使用に関して他の処理ュ- ットに対するサービスユニットの役割を担う。サービスユニットの役割としては、たとえ ばバッファ 220の初期状態の設定や、後述するビット列のの初期設置などである。な お、このサービスユニットは、いずれの処理ユニットによって担当されてもよい。処理 ユニット 210のうちに主処理ユニットがある場合には、このサービスユニットは、主処 理ユニットによって担当されることが好ましいが、それに限定することがない。
[0116] 図 18は、共有メモリ 250を示す。共有メモリ 250は、ノ ッファ 220と、ビット列 230と、 ポインタキュー 240とを有する。 [0117] ノ ッファ 220は、連続した複数のブロックに分けられており、各ブロックに対して識別 子 (ここではブロック番号)が付与されて 、る。
[0118] ビット列 230は、バッファ 220に含まれるブロックの数の分のビット幅を有し、各ビット は、それぞれのブロックに対応している。なお、すべてのビットの初期値が 0である。
[0119] ポインタキュー 240は、書込が完了したブロックの番号を、書込完了順に保持する。
初期状態では、空になっている。
[0120] いずれかのプロデューサ 212は、書込を開始したいときに、書込をしてもいいブロッ クとして、ビット列 230のうち、値が 0であるビットに対応するブロックを選出し、このブ ロックに対して書込を開始する。ブロックに対する書込の開始に伴って、プロデューサ 212は、ビット列 230における、このブロックに対応するビットの値を 1にセットする。
[0121] 書込が終了すると、プロデューサ 212は、書込が終了したブロックの番号をポインタ キュー 240に入れて、処理を終了する。
[0122] コンシユーマ 212は、読出を開始したいときに、ポインタキュー 240を参照し、最も 先に書込が完了したブロックの番号を、ポインタキュー 240から削除するとともに、こ の番号に対応するブロックからデータを読み出す。読出が完了すると、ビット列 230 における、このブロックに対応するビットの値を 0にリセットする。
[0123] すなわち、ビット列 230は、各ブロックが読出完了状態にあるかそれ以外の状態に あるかを示し、ポインタキュー 240にある力否かは、書込完了状態にあるかそれ以外 の状態にあるかを示しており、書込完了状態にあるブロックが複数ある場合には完了 順も示す。
[0124] このように、マルチプロセッサシステム 300も、安全なマルチアクセスを実現して!/、る
[0125] もちろん、第 3の実施形態に用いられたバッファの管理方法も、図 17に示すような マルチプロセッサシステムにのみならず、図 1に示すようなストリームデータを転送す るためのマルチプロセッサシステムなど、プロセッサ間でデータを授受する!、かなるマ ルチプロセッサシステムに適用してもょ 、。
[0126] 以上、本発明を実施の形態をもとに説明した。実施の形態は例示であり、本発明の 主旨から逸脱しな ヽ限り、それらの各構成要素や各処理プロセスの組合せに 、ろ ヽ ろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に 理解されるところである。
[0127] たとえば、図 1および図 8に示す実施形態のマルチプロセッサシステムにおいて、各 ビット列を共有メモリ上のアトミック領域に更新しながら保持することによって、同じく共 有メモリ上のバッファの同期を行うするようにしている力、これらのビット列の機能をラ イブラリとして実装し、ノッファを、プロデューサ側のローカルメモリに実装したり、コン シユーマ側のローカルメモリに実装するようにしてもょ 、。
[0128] さらに、プロデューサが必要とする情報と、コンシユーマが必要とする情報とは異な ることに着目し、共有メモリを用いない実装形態を実現してもよい。たとえば、図 1に示 す実施形態のシステムにおいて、プロデューサが必要とする情報は、読出が完了し た力否かを示す情報(図 1に示す実施形態にぉ 、てはビット列 30a)と、先行ポインタ であり、コンシユーマが必要とする情報は、書込が完了したか否かを示す情報(図 1に 示す実施形態においてはビット列 30b)と、追尾ポインタである。そのため、先行ボイ ンタと追尾ポインタは、プロデューサとコンシユーマ間で共有する必要がない。プロデ ユーサとコンシユーマはひとつずつ存在する場合において、共有する必要のある情 報について、プロデューサ、コンシユーマのそれぞれ力メッセージパッシングの手法 を用いて他者に必要な情報を互いに送信しあうことによって共有することができる。具 体的には、プロデューサは、書込が完了すれば、書込完了情報を更新してコンシュ 一マに送信し、コンシユーマは、受信した情報と、 自分が保持している書込完了情報 とをたとえばビット列に ORしていくことで蓄積するように更新する。読出完了情報に ついても同じであり、読出が完了したコンシユーマは、読出完了情報を更新してプロ デューサに送信し、プロデューサは、受信した情報と、自分が保持している読出完了 情報とをたとえば ORコマンドによって更新する。このような実装態様によって、ビット 列の保持に共有メモリを用いずにバッファの同期を実現することができる。
[0129] また、上述した実施形態にお!、て、例としてプロセッサを処理主体とし、システムとし てはマルチプロセッサシステムとなっているが、本発明によるバッファ管理技術は、処 理主体をタスク(プロセス、スレッドなどを含む)としたいかなるマルチタスクシステムに ち適用することがでさる。 産業上の利用可能性
以上のように本発明は、複数のタスクを並列に処理するコンピュータ、携帯電話、ゲ ーム機器などの電子機器に利用可能である。

Claims

請求の範囲
[1] 複数のブロックに分けられ、それぞれのブロックが各処理主体間で転送されるデー タの一時的な格納場所として、データを書き込む側の処理主体であるプロデューサと 、プロデューサにより書き込まれたデータを読み出す側の処理主体であるコンシユー マとによって所定の順序で循環使用されるバッファを管理する方法であって、 使用中、書込完了、読出完了のいずれの状態にあるかをブロックに対応づけて示 すブロック状態情報を更新しながら保持し、
前記所定の順序で最も先に書込がなされるブロックに対して、該ブロックを示す先 行ポインタと追尾ポインタを設け、
2つのポインタが同じ方向に進行し、かつ互いに追!、抜かな!/、制約の下で、 前記先行ポインタにより示されるブロックに対する書込の開始後、次のブロックが読 出完了状態にある場合に限り、前記先行ポインタを次のブロックに進め、
前記追尾ポインタにより示されるブロックに対する読出の開始後、次のブロックが書 込完了状態にある場合に限り、前記追尾ポインタを次のブロックに進めることを特徴と するバッファ管理方法。
[2] 複数のブロックに分けられ、それぞれのブロックが各処理主体間で転送されるデー タの一時的な格納場所として、データを書き込む側の処理主体であるプロデューサと 、プロデューサにより書き込まれたデータを読み出す側の処理主体であるコンシユー マとによって所定の順序で循環使用されるバッファを管理する方法であって、 書込完了力 れ以外力をブロックに対応づけて示す書込完否情報と、読出完了か それ以外力をブロックに対応づけて示す読出完否情報とを含むブロック状態情報を 更新しながら保持し、
前記所定の順序で最も先に書込がなされるブロックに対して、該ブロックを示す第 1 の先行ポインタ、第 2の先行ポインタ、第 1の追尾ポインタ、第 2の追尾ポインタを設け 、すべてのポインタの進行方向が同じであり、かつ前記第 1の先行ポインタ、第 2の先 行ポインタ、第 1の追尾ポインタ、第 2の追尾ポインタの順で互いに追い抜かない制 約の下で、
ブロックに対する書込の開始後、該ブロックを示す前記第 1の先行ポインタを次のブ ロックに進め、
前記第 2の先行ポインタにより示されるブロックの書込の完了後、前記第 2の先行ポ インタにより示されるブロック力も連続し、かつ書込完了状態にあるブロックのうち、前 記第 2の先行ポインタ力 最も離れたブロックの次のブロックに前記第 2の先行ポイン タを進め、
ブロックに対する読出の開始後、該ブロックを示す前記第 1の追尾ポインタを次のブ ロックに進め、
前記第 2の追尾ポインタにより示されるブロックの読出の完了後、前記第 2の追尾ポ インタにより示されるブロック力も連続し、かつ読出完了状態にあるブロックのうち、前 記第 2の追尾ポインタ力 最も離れたブロックの次のブロックに前記第 2の追尾ポイン タを進めることを特徴とするバッファ管理方法。
[3] 前記書込完否情報を、ノ ッファに同時にアクセス可能な前記プロデューサの分の、 前記第 2の先行ポインタにより示されるブロックを起点として連続したブロックのみに 対して持ち、
前記読出完否情報を、ノ ッファに同時にアクセス可能な前記コンシユーマの分の、 前記第 2の追尾ポインタにより示されるブロックを起点として連続したブロックのみに 対して持つことを特徴とする請求項 2記載のバッファ管理方法。
[4] 前記処理主体は、プロセッサであり、
前記ブロック状態情報の更新および Zまたはポインタの進行は、書込または読出を 行うプロセッサ、あるいは書込または読出を行ったプロセッサにより行われることを特 徴とする請求項 1から 3のいずれか 1項記載のバッファ管理方法。
[5] 前記ブロック状態情報を、各ブロックにつ 、て 2ビットを割り当てたビットマップとして 保持し、
不可分操作によって前記ビットマップの更新を行うことを特徴とする請求項 1から 4 の!、ずれか 1項記載のバッファ管理方法。
[6] 複数のブロックに分けられ、それぞれのブロックが各処理主体間で転送されるデー タの一時的な格納場所として、データを書き込む側の処理主体であるプロデューサと 、プロデューサにより書き込まれたデータを読み出す側の処理主体であるコンシユー マとによって所定の順序で循環使用されるバッファを管理する装置であって、 使用中、書込完了、読出完了のいずれの状態にあるかをブロックに対応づけて示 すブロック状態情報を保持するブロック状態情報保持部と、
前記ブロック状態情報を、書込と読出の進行に伴って更新するブロック状態更新部 と、
前記所定の順序で最も先に書込がなされるブロックに対して、該ブロックを示す先 行ポインタと追尾ポインタを設けるポインタ設置部と、
2つのポインタが同じ方向に進行し、かつ互いに追!、抜かな!/、制約の下で、 前記先行ポインタにより示されるブロックに対する書込の開始後、次のブロックが読 出完了状態にある場合に限り、前記先行ポインタを次のブロックに進め、
追尾ポインタにより示されるブロックに対する読出の開始後、次のブロックが書込完 了状態にある場合に限り、追尾ポインタを次のブロックに進めるポインタ進行部とを有 することを特徴とするバッファ管理装置。
複数のブロックに分けられ、それぞれのブロックが各処理主体間で転送されるデー タの一時的な格納場所として、データを書き込む側の処理主体であるプロデューサと 、プロデューサにより書き込まれたデータを読み出す側の処理主体であるコンシユー マとによって所定の順序で循環使用されるバッファを管理する装置であって、 書込完了力 れ以外力をブロックに対応づけて示す書込完否情報と、読出完了か それ以外力をブロックに対応づけて示す読出完否情報とを含むブロック状態情報を 保持するブロック状態情報保持部と、
ブロック状態情報を更新するブロック状態情報更新部と、
前記所定の順序で最も先に書込がなされるブロックに対して、該ブロックを示す第 1 の先行ポインタ、第 2の先行ポインタ、第 1の追尾ポインタ、第 2の追尾ポインタを設け るポインタ設置部と、
すべてのポインタの進行方向が同じであり、かつ第 1の先行ポインタ、第 2の先行ポ インタ、第 1の追尾ポインタ、第 2の追尾ポインタの順で互いに追い抜かない制約の 下で、
ブロックに対する書込の開始後、該ブロックを示す前記第 1の先行ポインタを次のブ ロックに進め、
前記第 2の先行ポインタにより示されるブロックの書込の完了後、第 2の先行ポイン タにより示されるブロック力も連続し、かつ書込完了状態にあるブロックのうち、前記第 2の先行ポインタ力 最も離れたブロックの次のブロックに前記第 2の先行ポインタを 進め、
ブロックに対する読出の開始後、該ブロックを示す前記第 1の追尾ポインタを次のブ ロックに進め、
前記第 2の追尾ポインタにより示されるブロックの読出の完了後、前記第 2の追尾ポ インタにより示されるブロック力も連続し、かつ読出完了状態にあるブロックのうち、前 記第 2の追尾ポインタ力 最も離れたブロックの次のブロックに前記第 2の追尾ポイン タを進めるポインタ進行部とを有することを特徴とするバッファ管理装置。
[8] 前記書込状態情報保持部は、バッファに同時にアクセス可能な前記プロデューサ の分の、前記第 2の先行ポインタにより示されるブロックを起点として連続したブロック のみに対して前記書込完否情報を保持し、
ノ ッファに同時にアクセス可能な前記コンシユーマの分の、前記第 2の追尾ポインタ により示されるブロックを起点として連続したブロックのみに対して前記読出完否情報 を保持することを特徴とする請求項 7記載のバッファ管理装置。
[9] 前記処理主体は、プロセッサであり、
前記ブロック状態情報更新部および Zまたは前記ポインタ進行部は、書込または 読出を行うプロセッサ、あるいは書込または読出を行ったプロセッサにより構成される ことを特徴とする請求項 6から 8のいずれか 1項記載のバッファ管理装置。
[10] 前記ブロック状態情報保持部は、前記ブロック状態情報として、各ブロックにつ ヽて 2ビットを割り当てたビットマップ保持し、
前記ブロック状態更新部は、不可分操作によって前記ビットマップの更新を行うこと を特徴とする請求項 6から 9のいずれか 1項記載のバッファ管理装置。
[11] 複数のブロックに分けられ、それぞれのブロックが各処理主体間で転送されるデー タの一時的な格納場所として、データを書き込む側の処理主体であるプロデューサと 、プロデューサにより書き込まれたデータを読み出す側の処理主体であるコンシユー マとによって所定の順序で循環使用されるノ ッファを管理するためのプログラムであ つて、
使用中、書込完了、読出完了のいずれの状態にあるかをブロックに対応づけてなり 、書込と読出の進行に伴って更新されるブロック状態情報を保持する機能と、 前記所定の順序で最も先に書込がなされるブロックに対して、該ブロックを示す先 行ポインタと追尾ポインタを設ける機能と、
2つのポインタが同じ方向に進行し、かつ互いに追!、抜かな!/、制約の下で、 前記先行ポインタにより示されるブロックに対する書込の開始後、次のブロックが読 出完了状態にある場合に限り、前記先行ポインタを次のブロックに進め、
前記追尾ポインタにより示されるブロックに対する読出の開始後、次のブロックが書 込完了状態にある場合に限り、前記追尾ポインタを次のブロックに進める機能とをコ ンピュータに実行せしめることを特徴とするプログラム。
複数のブロックに分けられ、それぞれのブロックが各処理主体間で転送されるデー タの一時的な格納場所として、データを書き込む側の処理主体であるプロデューサと 、プロデューサにより書き込まれたデータを読み出す側の処理主体であるコンシユー マとによって所定の順序で循環使用されるノ ッファを管理するためのプログラムであ つて、
書込完了かそれ以外か、読出完了かそれ以外かをブロックに対応づけてなり、書込 と読出の進行に伴って更新されるブロック状態情報を保持する機能と、
前記所定の順序で最も先に書込がなされるブロックに対して、該ブロックを示す第 1 の先行ポインタ、第 2の先行ポインタ、第 1の追尾ポインタ、第 2の追尾ポインタを設け る機能と、
すべてのポインタの進行方向が同じであり、かつ前記第 1の先行ポインタ、第 2の先 行ポインタ、第 1の追尾ポインタ、第 2の追尾ポインタの順で互いに追い抜かない制 約の下で、
ブロックに対する書込の開始後、該ブロックを示す前記第 1の先行ポインタを次のブ ロックに進め、
前記第 2の先行ポインタにより示されるブロックの書込の完了後、前記第 2の先行ポ インタにより示されるブロック力も連続し、かつ書込完了状態にあるブロックのうち、前 記第 2の先行ポインタ力 最も離れたブロックの次のブロックに前記第 2の先行ポイン タを進め、
ブロックに対する読出の開始後、該ブロックを示す前記第 1の追尾ポインタを次のブ ロックに進め、
前記第 2の追尾ポインタにより示されるブロックの読出の完了後、前記第 2の追尾ポ インタにより示されるブロック力も連続し、かつ読出完了状態にあるブロックのうち、前 記第 2の追尾ポインタ力 最も離れたブロックの次のブロックに前記第 2の追尾ポイン タを進める機能とをコンピュータ実行せしめることを特徴とするプログラム。
[13] 複数のブロックに分けられ、それぞれのブロックが各処理主体間で転送されるデー タの一時的な格納場所として、データを書き込む側の処理主体であるプロデューサと 、プロデューサにより書き込まれたデータを読み出す側の処理主体であるコンシユー マとによって所定の順序で循環使用されるノ ッファを管理するためのプログラムを記 憶した記憶媒体であって、
前記プログラムは、
使用中、書込完了、読出完了のいずれの状態にあるかをブロックに対応づけてなり 、書込と読出の進行に伴って更新されるブロック状態情報を保持する機能と、 前記所定の順序で最も先に書込がなされるブロックに対して、該ブロックを示す先 行ポインタと追尾ポインタを設ける機能と、
2つのポインタが同じ方向に進行し、かつ互いに追!、抜かな!/、制約の下で、 前記先行ポインタにより示されるブロックに対する書込の開始後、次のブロックが読 出完了状態にある場合に限り、前記先行ポインタを次のブロックに進め、
前記追尾ポインタにより示されるブロックに対する読出の開始後、次のブロックが書 込完了状態にある場合に限り、前記追尾ポインタを次のブロックに進める機能とをコ ンピュータに実行せしめることを特徴とする記憶媒体。
[14] 複数のブロックに分けられ、それぞれのブロックが各処理主体間で転送されるデー タの一時的な格納場所として、データを書き込む側の処理主体であるプロデューサと 、プロデューサにより書き込まれたデータを読み出す側の処理主体であるコンシユー マとによって所定の順序で循環使用されるノ ッファを管理するためのプログラムを記 憶した記憶媒体であって、
前記プログラムは、
書込完了かそれ以外か、読出完了かそれ以外かをブロックに対応づけてなり、書込 と読出の進行に伴って更新されるブロック状態情報を保持する機能と、
前記所定の順序で最も先に書込がなされるブロックに対して、該ブロックを示す第 1 の先行ポインタ、第 2の先行ポインタ、第 1の追尾ポインタ、第 2の追尾ポインタを設け る機能と、
すべてのポインタの進行方向が同じであり、かつ前記第 1の先行ポインタ、第 2の先 行ポインタ、第 1の追尾ポインタ、第 2の追尾ポインタの順で互いに追い抜かない制 約の下で、
ブロックに対する書込の開始後、該ブロックを示す前記第 1の先行ポインタを次のブ ロックに進め、
前記第 2の先行ポインタにより示されるブロックの書込の完了後、前記第 2の先行ポ インタにより示されるブロック力も連続し、かつ書込完了状態にあるブロックのうち、前 記第 2の先行ポインタ力 最も離れたブロックの次のブロックに前記第 2の先行ポイン タを進め、
ブロックに対する読出の開始後、該ブロックを示す前記第 1の追尾ポインタを次のブ ロックに進め、
前記第 2の追尾ポインタにより示されるブロックの読出の完了後、前記第 2の追尾ポ インタにより示されるブロック力も連続し、かつ読出完了状態にあるブロックのうち、前 記第 2の追尾ポインタ力 最も離れたブロックの次のブロックに前記第 2の追尾ポイン タを進める機能とをコンピュータ実行せしめることを特徴とする記憶媒体。
PCT/JP2006/310908 2005-08-15 2006-05-31 バッファ管理方法およびバッファ管理装置 WO2007020740A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP06756828.7A EP1936501B1 (en) 2005-08-15 2006-05-31 Buffer management method and buffer management device
US11/996,359 US7904618B2 (en) 2005-08-15 2006-05-31 Buffer managing method and buffer managing apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005235580A JP3926374B2 (ja) 2005-08-15 2005-08-15 バッファ管理方法およびバッファ管理装置
JP2005-235580 2005-08-15

Publications (1)

Publication Number Publication Date
WO2007020740A1 true WO2007020740A1 (ja) 2007-02-22

Family

ID=37757409

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/310908 WO2007020740A1 (ja) 2005-08-15 2006-05-31 バッファ管理方法およびバッファ管理装置

Country Status (4)

Country Link
US (1) US7904618B2 (ja)
EP (1) EP1936501B1 (ja)
JP (1) JP3926374B2 (ja)
WO (1) WO2007020740A1 (ja)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5132612B2 (ja) * 2009-03-12 2013-01-30 日本電信電話株式会社 データ転送方法および装置
US20110296437A1 (en) * 2010-05-28 2011-12-01 Devendra Raut Method and apparatus for lockless communication between cores in a multi-core processor
JP5738618B2 (ja) * 2011-02-08 2015-06-24 オリンパス株式会社 データ処理装置
US10362568B2 (en) * 2014-11-06 2019-07-23 Commscope Technologies Llc High-speed capture and analysis of downlink data in a telecommunications system
US10223301B2 (en) * 2016-11-29 2019-03-05 International Business Machines Corporation Pre-allocating memory buffers by physical processor and using a bitmap metadata in a control program
US10235310B2 (en) 2016-11-29 2019-03-19 International Business Machines Corporation Deallocation of memory buffer in multiprocessor systems
WO2019127244A1 (en) 2017-12-28 2019-07-04 SZ DJI Technology Co., Ltd. System and method for supporting low latency in a movable platform environment
US10691374B2 (en) * 2018-07-24 2020-06-23 Salesforce.Com, Inc. Repeatable stream access by multiple components
CN110874273B (zh) * 2018-08-31 2023-06-13 阿里巴巴集团控股有限公司 一种数据处理方法及装置
JP2020154805A (ja) * 2019-03-20 2020-09-24 キオクシア株式会社 マルチプロセッサシステム及び共有メモリの制御方法
EP3742748B1 (en) 2019-05-21 2021-07-21 Siemens Gamesa Renewable Energy A/S Method and transfer device for transferring data blocks
JP2023087414A (ja) * 2021-12-13 2023-06-23 株式会社オートネットワーク技術研究所 車載制御装置、制御方法及びコンピュータプログラム

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0887478A (ja) * 1994-09-16 1996-04-02 Nippon Telegr & Teleph Corp <Ntt> プロセス間メッセージ通信方法
JPH08241186A (ja) * 1995-03-07 1996-09-17 Fujitsu Ltd バッファメモリ管理ユニット及びバッファメモリ管理方法
JP2006040285A (ja) * 2004-07-29 2006-02-09 Hewlett-Packard Development Co Lp パーティショニングされたデバイス間の通信

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69230204T2 (de) * 1991-08-16 2000-02-10 Fujitsu Ltd Pufferspeicher und Verwaltungsverfahren dafür
US5867734A (en) * 1994-11-21 1999-02-02 Intel Corporation Multiple-reader multiple-writer queue for a computer system
US6073190A (en) * 1997-07-18 2000-06-06 Micron Electronics, Inc. System for dynamic buffer allocation comprising control logic for controlling a first address buffer and a first data buffer as a matched pair
US6173307B1 (en) * 1998-08-20 2001-01-09 Intel Corporation Multiple-reader multiple-writer queue for a computer system
US6381659B2 (en) * 1999-01-19 2002-04-30 Maxtor Corporation Method and circuit for controlling a first-in-first-out (FIFO) buffer using a bank of FIFO address registers capturing and saving beginning and ending write-pointer addresses
US6304924B1 (en) * 1999-02-02 2001-10-16 International Business Machines Corporation Two lock-free, constant-space, multiple-(impure)-reader, single-writer structures
US6874062B1 (en) * 2000-02-22 2005-03-29 Unisys Corporation System and method for utilizing a hierarchical bitmap structure for locating a set of contiguous ordered search items having a common attribute
JP2001251375A (ja) * 2000-03-06 2001-09-14 Sony Corp 伝送方法、伝送システム、入力装置、出力装置及び伝送制御装置
US6925506B1 (en) * 2000-09-29 2005-08-02 Cypress Semiconductor Corp. Architecture for implementing virtual multiqueue fifos
KR100358178B1 (ko) * 2000-12-27 2002-10-25 한국전자통신연구원 공유메모리 스위치에서의 멀티캐스팅 장치 및 그 방법
US7457894B2 (en) * 2001-08-29 2008-11-25 Nxp B.V. Synchronization of non-sequential moving pointers
US7689623B1 (en) * 2002-04-08 2010-03-30 Syncsort Incorporated Method for performing an external (disk-based) sort of a large data file which takes advantage of “presorted” data already present in the input
US7170628B2 (en) * 2002-12-20 2007-01-30 Texas Instruments Incorporated Efficient processing of images in printers
US7302457B2 (en) * 2003-11-12 2007-11-27 Hewlett-Packard Development Company, L.P. Method and apparatus for providing random bits
US7386688B2 (en) * 2004-07-29 2008-06-10 Hewlett-Packard Development Company, L.P. Communication among partitioned devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0887478A (ja) * 1994-09-16 1996-04-02 Nippon Telegr & Teleph Corp <Ntt> プロセス間メッセージ通信方法
JPH08241186A (ja) * 1995-03-07 1996-09-17 Fujitsu Ltd バッファメモリ管理ユニット及びバッファメモリ管理方法
JP2006040285A (ja) * 2004-07-29 2006-02-09 Hewlett-Packard Development Co Lp パーティショニングされたデバイス間の通信

Also Published As

Publication number Publication date
EP1936501A4 (en) 2009-11-11
JP3926374B2 (ja) 2007-06-06
US7904618B2 (en) 2011-03-08
EP1936501A1 (en) 2008-06-25
JP2007052510A (ja) 2007-03-01
US20090043927A1 (en) 2009-02-12
EP1936501B1 (en) 2018-08-08

Similar Documents

Publication Publication Date Title
WO2007020740A1 (ja) バッファ管理方法およびバッファ管理装置
CN101667284B (zh) 用于中央处理单元和图形处理单元之间通信的设备和方法
CN106462395B (zh) 多线程处理器架构中的线程等待
JP2017208145A (ja) ミドルウェアマシン環境においてマルチノードアプリケーションのためのメッセージキューを提供および管理するためのシステムおよび方法
JP4357473B2 (ja) データ処理システムおよびプログラム
JP4963018B2 (ja) スケジューリング方法およびスケジューリング装置
JP2501419B2 (ja) 多重プロセッサメモリシステム及びメモリ参照競合解決方法
CN107729267B (zh) 资源的分散分配以及用于支持由多个引擎执行指令序列的互连结构
Ahmadinia et al. Task scheduling for heterogeneous reconfigurable computers
CN105379209A (zh) 利用分段队列远程存储访问的低延迟装置互联
US20070050527A1 (en) Synchronization method for a multi-processor system and the apparatus thereof
CN102724035A (zh) 一种加密卡的加解密方法
JP4248661B2 (ja) バス・ブリッジ
US20120185672A1 (en) Local-only synchronizing operations
CN103246482A (zh) 用于存储器覆盖的设备和方法
JP2003271574A (ja) 共有メモリ型マルチプロセッサシステムにおけるデータ通信方法
CN104142802A (zh) 存储器控制设备和方法
US9779044B2 (en) Access extent monitoring for data transfer reduction
JP2006313479A (ja) 半導体集積回路装置及びデータ転送方法
EP0797803B1 (en) Chunk chaining for a vector processor
JP4170330B2 (ja) 情報処理装置
CN115269132A (zh) 处理单元的工作调度
JP4599438B2 (ja) パイプライン処理装置、パイプライン処理方法及びパイプライン制御プログラム
JP2011501306A (ja) データをバックアップおよび復元するための構造および方法
JP7080698B2 (ja) 情報処理装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 11996359

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2006756828

Country of ref document: EP