WO2009093680A1 - マルチプロセッサシステムおよびマルチプロセッサシステムの同期方法 - Google Patents

マルチプロセッサシステムおよびマルチプロセッサシステムの同期方法 Download PDF

Info

Publication number
WO2009093680A1
WO2009093680A1 PCT/JP2009/051051 JP2009051051W WO2009093680A1 WO 2009093680 A1 WO2009093680 A1 WO 2009093680A1 JP 2009051051 W JP2009051051 W JP 2009051051W WO 2009093680 A1 WO2009093680 A1 WO 2009093680A1
Authority
WO
WIPO (PCT)
Prior art keywords
barrier
register
processors
registers
processor
Prior art date
Application number
PCT/JP2009/051051
Other languages
English (en)
French (fr)
Inventor
Hironori Kasahara
Keiji Kimura
Masayuki Ito
Tatsuya Kamei
Toshihiro Hattori
Original Assignee
Waseda University
Renesas Technology Corp.
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 Waseda University, Renesas Technology Corp. filed Critical Waseda University
Priority to CN200980103004.XA priority Critical patent/CN101925881B/zh
Publication of WO2009093680A1 publication Critical patent/WO2009093680A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs

Definitions

  • the present invention relates to a multiprocessor system and a synchronization method thereof, and more particularly to a technology usefully applied to a multiprocessor system and a synchronization method thereof that perform barrier synchronization processing by hardware.
  • Patent Document 1 describes a method of performing synchronization between processors in a multiprocessor system including N processors connected to a system bus with a broadcasting function via a bus interface.
  • each processor includes an N-bit synchronization register in which each bit corresponds to N processors.
  • Each processor sets the corresponding bit of the synchronization register to “1” when its own phase is completed, and notifies other processors via the system bus, and the other processors receive this notification. Update the synchronization register.
  • each processor can perform synchronization processing by recognizing “1” of all bits of the synchronization register.
  • Patent Document 2 describes a system in which inter-cluster communication registers are provided between a plurality of clusters each including a plurality of processors to perform barrier synchronization between the clusters.
  • the number of clusters is set in the inter-cluster communication register, and the representative processor existing in each cluster subtracts 1 from the number of clusters, so that the barrier synchronization process can be completed when the number becomes 0.
  • Patent Documents 3 and 4 describe a method of performing software synchronization by providing a synchronization flag area corresponding to each processor on a shared memory of a multiprocessor system.
  • Patent Document 5 describes a method of performing synchronization using a hierarchical cache in a multiprocessor system including a hierarchical cache. Specifically, for example, when a primary cache is provided for each of CPU0 and CPU1 in a processor module and a common secondary cache is provided above the two primary caches, synchronization of multiple threads executed by CPU0 is performed. The flag variable secured on the primary cache is used, and CPU0 and CPU1 are synchronized with the flag variable secured on the secondary cache.
  • Non-Patent Document 1 detects one P-bit register provided in common for P processors and a case where the values of the P-bit register are all zero, and a detection signal at that time Describes a configuration including a detection circuit or the like that transmits P to P processors.
  • each processor When performing barrier synchronization after executing parallel processing with P processors, each processor writes zero to the corresponding bit of the P-bit register when its own processing is completed. When the processing of all the processors is completed, a detection signal is transmitted to all the processors, thereby enabling barrier synchronization.
  • Non-Patent Document 1 also shows a configuration in which a register array including (P-1) sets of P-bit registers is provided in order to perform multiple loops in parallel processing. Japanese Patent Laid-Open No.
  • multiprocessor or multicore technology has been used as a measure for improving performance in place of improvement in operating frequency due to problems such as leakage current and power consumption accompanying miniaturization and speeding up of semiconductor chips.
  • one processing content called a task or process is usually divided into a plurality of processing units each called a thread, and parallel processing by a plurality of processors is performed by appropriately assigning the plurality of threads to each processor. Executed. Therefore, there is a dependency relationship between multiple threads, for example, the processing result of one thread is used by another thread to perform further processing, and with this, multiple processors that perform processing dependent on each other are synchronized. So-called barrier synchronization in which waiting is performed at points is required.
  • Such barrier synchronization can be realized by hardware or software.
  • Patent Document 3, Patent Document 4, and Patent Document 5 described above describe a method for realizing barrier synchronization by software.
  • the software method is to set a flag variable on a memory shared by each processor.
  • Each processor can recognize whether the processing of a processor other than itself has ended by updating and referring to this flag variable when its own processing is completed.
  • each processor accesses the common flag variable on the shared memory, so that it takes time to complete the barrier synchronization. That is, in addition to a simple memory access time, a lot of arbitration time is required until an access right to the shared memory is obtained.
  • Patent Document 5 it is possible to increase the speed to some extent by securing a flag variable on the specified cache memory.
  • a cache memory specifying means is required or a write back occurs. It is thought that special control of the cache memory is necessary because the speed decreases.
  • Patent Document 1, Patent Document 2, and Non-Patent Document 1 described above describe a method for realizing barrier synchronization by hardware.
  • the methods of Patent Document 2 and Non-Patent Document 1 provide a common flag register for a plurality of processors, and perform barrier synchronization by writing or referring to the flag register. In this case, since it is necessary to exclusively control access to the flag register, this processing may take time.
  • each processor is provided with the flag register described above, and the coherency (consistency) of each flag register is maintained via a common system bus.
  • arbitration time for securing the bus access right is required, so that high-speed barrier synchronization processing becomes difficult.
  • the present invention has been made in view of the above, and one of its purposes is to provide a multiprocessor system capable of realizing highly efficient barrier synchronization processing and a synchronization method thereof.
  • a multiprocessor system includes N (N ⁇ 2) processors, N barrier write registers (first registers) and N processors provided in the N processors, respectively. It has a barrier read register (second register) and a first means.
  • the first means is that when any one of the N processors writes the first information to the barrier write register provided in itself for the barrier synchronization, the first information is provided to another processor. The data is transmitted to the barrier read register.
  • This first means is realized, for example, by a wiring block for directly wiring N barrier write registers to N barrier read registers.
  • a certain processor writes the first information indicating its own synchronization wait in its own barrier write register, and this first information is immediately reflected in the barrier read register of another processor. Can do. Therefore, other processors can immediately know whether or not a processor other than itself is waiting for synchronization by reading its own barrier read register, so that high-speed barrier synchronization processing can be realized. In this case, information transmission from the barrier write register to the barrier read register is performed using a dedicated wiring block without using the system bus, so that the speed can be increased.
  • Each processor writes the first information to its own barrier write register when notifying its own synchronization wait to other processors, and when it knows the status of other processors' synchronization waits, Since it is sufficient to read the register, it is not necessary to add a special instruction set to the CPU, and barrier synchronization processing can be realized at low cost. Furthermore, when a processor other than itself writes the first information to the barrier write register, this first information is reflected directly on the barrier read register in the processor itself, not in an indirect form such as an interrupt. Therefore, the own processor is not obstructed by the reflection of the current process. As described above, highly efficient barrier synchronization processing can be realized.
  • the multiprocessor system includes a plurality of sets of the barrier write register and the barrier read register as described above. Thereby, for example, when executing processing contents including barrier synchronization processing of a plurality of hierarchies, one set can be assigned to each layer, and such barrier synchronization processing can be easily realized.
  • the barrier write register as described above is composed of a plurality of bits.
  • a plurality of types of synchronization points can be set as version numbers, and it is possible to flexibly cope with advanced or complicated barrier synchronization processing.
  • each layer of a plurality of layers as described above can be assigned to each bit of the plurality of bits of the barrier write register.
  • the version number as described above is used in combination, it is possible to flexibly cope with higher-level or complicated barrier synchronization processing.
  • FIG. 1 is a block diagram showing an example of the overall configuration of a multiprocessor system according to a first embodiment of the present invention.
  • the multiprocessor system by Embodiment 1 of this invention it is the schematic which shows the structural example of the principal part.
  • FIG. 7 is a schematic diagram showing another configuration example of the main part of the multiprocessor system according to the first embodiment of the present invention.
  • FIG. 4 is an explanatory diagram showing an example of the operation in the multiprocessor system of FIGS. 2 and 3. It is explanatory drawing which shows an example of the detailed process content of the barrier synchronous process in FIG.
  • FIG. 4 is an explanatory diagram showing another example of the operation in the multiprocessor system of FIGS. 2 and 3.
  • FIG. 12 is an explanatory diagram showing an example of the operation in the multiprocessor system of FIG. 11.
  • FIG. 12 is an explanatory diagram showing another example of the operation in the multiprocessor system of FIG.
  • FIG. 12 is an explanatory diagram showing still another example of the operation in the multiprocessor system of FIG. 11.
  • FIG. 13 is an explanatory diagram showing an operation example obtained by modifying FIG. 12 in the multiprocessor system according to the fourth embodiment of the present invention.
  • the multiprocessor system by Embodiment 5 of this invention it is the schematic which shows the structural example of the principal part.
  • FIG. 17 is an explanatory diagram showing an example of the operation in the multiprocessor system of FIG. 16.
  • FIG. 17 is an explanatory diagram showing another example of the operation in the multiprocessor system of FIG. 16.
  • FIG. 19 is an explanatory diagram showing an example of detailed source code used in the barrier synchronization process in the operation example of FIG. 18.
  • FIG. 17 is an explanatory diagram showing another example of the operation using the configuration example of FIG. 16 in the multiprocessor system according to the sixth embodiment of the present invention.
  • the multiprocessor system by Embodiment 7 of this invention it is the schematic which shows the structural example of the principal part. It is explanatory drawing which shows the example of use in the multiprocessor system of FIG.
  • the number of elements when referring to the number of elements (including the number, numerical value, quantity, range, etc.), especially when clearly indicated and when clearly limited to a specific number in principle, etc. Except, it is not limited to the specific number, and may be more or less than the specific number.
  • the constituent elements including element steps and the like
  • the shapes, positional relationships, etc. of the components, etc. when referring to the shapes, positional relationships, etc. of the components, etc., the shapes are substantially the same unless otherwise specified, or otherwise apparent in principle. And the like are included. The same applies to the above numerical values and ranges.
  • the semiconductor chip CP includes, but is not limited to, a system bus SHWY.
  • a plurality (two in this case) of clusters CLS0, 1, memory controllers LBSC, DBSC, shared memory CSM, DMA (Direct Memory Access) controllers DMAC0, DMAC1, peripheral bus bridge HPB, and the like are connected to this SHWY.
  • a clock generation unit CPG, a general-purpose IO interface unit GPIO, timer units TMU0 to TMU3, an interrupt controller INTC, and the like are connected to the destination via the HPB.
  • the memory controller LBSC controls the external memory (SRAM) MEM1
  • the memory controller DBSC controls the external memory (DDR2-SDRAM) MEM2.
  • the cluster conceptually means individual system units distributed by so-called clustering, and is generally used from the viewpoint of reliability and high speed.
  • the cluster CLS0 includes a snoop bus SNB0 and a snoop bus controller SNC0 that controls the snoop bus SNB0.
  • a snoop bus SNB0 To the snoop bus SNB0, a plurality (four in this case) of processors (CPU: Central Processing Unit) CPUs # 0 to # 3 are connected.
  • the SNB0 and SNC0 monitor the update operation of the cache memory included in each of the CPUs # 0 to # 3 and perform control so that the cache memory coherency can be maintained between the CPUs # 0 to # 3. In this way, the overall speed of the system can be increased by controlling the coherency of the cache memory without using the system bus SHWY.
  • the cluster CLS0 also includes a debug controller DBG0.
  • Each of the CPUs # 0 to # 3 includes a CPU module CPU_MD, a floating point number calculation unit FPU, a cache controller CCN, a system bus interface BIC, a user memory URAM, local memories IL and OL, and primary cache memories I $ and O. $ Etc. are included.
  • Each of the CPUs # 0 to # 3 performs a desired process using its primary cache memory I $, O $ as the lowest memory. At this time, if a write back to the upper memory occurs, access to the external memories MEM1, MEM2, etc. occurs via SHWY.
  • a secondary cache memory or the like that is common to the CPUs # 0 to # 3 may be provided in the cluster CLS0.
  • the wiring block WBLK0 transmits wiring (for 4 bits) from each BARW included in the CPUs # 0 to # 3 in the CLS0 to specific 4 bits (for example, bit [ 0] to [3]) are connected by broadcast and extended toward the wiring block WBLK1.
  • the wiring block WBLK1 transmits the wiring (for 4 bits) from each BARW included in the CPUs # 4 to # 7 in the CLS1 to the specific 4 bits (in the respective BARRs included in the CPUs # 4 to # 7). For example, each of the bits [4] to [7]) is connected by broadcast and extended toward the wiring block WBLK0.
  • WBLK0 broadcasts the wiring (for 4 bits) extended from WBLK1 to the remaining 4 bits (for example, bits [4] to [7]) in each BARR included in CPUs # 0 to # 3. Connect with.
  • WBLK1 connects the wiring (for 4 bits) extended from WBLK0 to the remaining 4 bits (for example, bits [0] to [3]) in each BARR included in CPUs # 4 to # 7, respectively. Connect by broadcast.
  • this written information is a specific 1 bit (eg, bit [0]) in each BARR included in the CPUs # 0 to # 7. Are simultaneously reflected through the wiring blocks WBLK0 and WBLK1.
  • the written information is a specific 1 bit (eg, bit [7]) in each BARR included in the CPUs # 0 to # 7. Are simultaneously reflected through the wiring blocks WBLK0 and WBLK1.
  • WBLK0 can be formed in the snoop bus controller SNC0 in FIG. 1
  • WBLK1 can be formed in the snoop bus controller SNC1.
  • FIG. 3 is a schematic diagram showing another configuration example of the main part of the multiprocessor system according to the first embodiment of the present invention.
  • the multiprocessor system shown in FIG. 3 is a configuration example in which eight CPUs # 0 to # 7 are in a flat state without being hierarchized by the clusters CLS0 and CLS1.
  • the 1-bit barrier write register BARW and the 8-bit barrier read register BARR included in each of the CPUs # 0 to # 7 are connected to each other.
  • the connection relationship at this time is substantially the same as that in FIG. 2, but the layout concept is different from that in FIG.
  • a plurality of wiring blocks are provided corresponding to the plurality of clusters, respectively.
  • the BARW and BARR included in the own cluster are interconnected, and the BARW information in the own cluster is bundled as cluster information and transmitted to the other cluster.
  • the cluster information from the other cluster is received and transmitted to the BARR of its own cluster.
  • one wiring block WBLK3 is provided corresponding to each of the CPUs # 0 to # 7.
  • wiring (8 bits) from each BARW included in CPUs # 0 to # 7 is connected to 8 bits of each BARR included in CPUs # 0 to # 7.
  • the barrier write register BARW and the barrier read register BARR are realized by, for example, a control register that can be accessed by the CPU executing a register access instruction, or the CPU It can be realized by a memory mapped register that can be accessed by executing a memory access instruction.
  • a memory-mapped register it is not necessary to add a CPU instruction set or the like, which is advantageous from the viewpoint of cost or ease as compared to the case where it is realized by a control register or the like.
  • the memory mapped register is not particularly limited, but is provided in, for example, the cache controller CCN of FIG.
  • FIG. 4 is an explanatory diagram showing an example of the operation of the multiprocessor system shown in FIGS.
  • the processing contents as shown in FIG. 4 can be used to save power.
  • all the CPUs # 0 to # 7 execute a predetermined process (thread) requiring high-speed operation in parallel at a high-speed clock frequency (S401).
  • each CPU executes a barrier synchronization process for waiting for a CPU other than itself after completing its own process (S402).
  • the master CPU for example, CPU # 0
  • the clock generation unit CPG in FIG. 1 reduces the clock frequency.
  • each CPU executes a predetermined process (thread) that does not require a high-speed operation in parallel using a low-speed clock frequency (S404).
  • each CPU executes a barrier synchronization process that waits with a CPU other than itself after completing its own process (S405).
  • the master CPU for example, CPU # 0
  • the master CPU issues a command to increase the clock frequency of all CPUs (S406).
  • all the CPUs # 0 to # 7 again execute a predetermined process requiring high-speed operation in parallel at the high-speed clock frequency (S407).
  • FIG. 5 is an explanatory diagram showing an example of detailed processing contents of the barrier synchronization processing in FIG.
  • the total number of CPUs is four (CPUs # 0 to # 3).
  • a code for barrier synchronization processing is added after a code for performing a predetermined process (corresponding to “do to enddo”).
  • “Inv rm” means an instruction to invert information in the barrier write register BARW.
  • “Rm” means a register field on software corresponding to BARW, and the subscript “m” means a CPU number.
  • “inv r0” is an instruction for inverting the BARW information of CPU # 0
  • “inv r1” is an instruction for inverting the BARW information of CPU # 1.
  • r0 is the BARW of CPU # 0 and is also the bit [0] of BARR included in CPUs # 0 to # 3
  • r3 is the BARW of CPU # 3
  • CPU # 0 that has completed predetermined processing first reverses its own BARW (initial value is zero) to “1” in accordance with the subsequent “inv rm” instruction. .
  • This information is reflected in the BARR of all CPUs via the above-described wiring block WBLK (in the example of FIG. 5, it is reflected in bit [0]).
  • the CPU # 2 that has completed the predetermined processing inverts its BARW (initial value is zero) to “1” in accordance with the subsequent “inv rm” instruction.
  • CPU # 1 that has completed the predetermined process inverts its BARW (initial value is zero) to “1” in accordance with the subsequent “inv rm” instruction.
  • This information is reflected in the BARR of all the CPUs via the wiring block WBLK (reflected in bit [1] in the example of FIG. 5).
  • CPU # 0 and CPU # 2 also maintain a standby state because their BARR value is "1110".
  • FIG. 6 is an explanatory diagram showing another example of the operation of the multiprocessor system shown in FIGS.
  • each of the CPUs # 0 to # 7 has predetermined processing (S601) ⁇ barrier synchronization processing (S602) ⁇ predetermined processing (S603) ⁇ barrier synchronization processing (S604) ⁇ predetermined processing (S605) ⁇ barrier synchronization. Processing (S606) is performed.
  • the barrier synchronization processing In S602, when all 8 bits of BARR are “1”, the synchronization point is set. In the next barrier synchronization process (S604), the 8 bits of BARR are all “0” as a synchronization point, and in the next barrier synchronization process (S606), all 8 bits of BARR are “1”. Becomes the synchronization point.
  • the barrier synchronization processing can be speeded up as compared with the case where the synchronization point is fixed to “1”. That is, it is not necessary to reset the barrier write register BARW and the barrier read register BARR to “0” after completing a certain barrier synchronization process.
  • the first register (BARW) for notifying other CPUs of the information for waiting for synchronization in each CPU and the other CPUs have notified each CPU.
  • a second register (BARR) that holds information of the first register is provided, and the information of the first register is reflected on the second register by direct wiring (for example, a metal wiring layer).
  • the direct wiring does not necessarily include only the wiring, but includes, for example, those that are substantially the case such as through a buffer circuit or a flip-flop circuit for adjusting the driving capability. .
  • direct wiring does not necessarily include only the wiring, but includes, for example, those that are substantially the case such as through a buffer circuit or a flip-flop circuit for adjusting the driving capability. .
  • each CPU only needs to access the first and second registers provided therein, so that the access time can be shortened as compared with the case of accessing a place other than itself. .
  • time efficiency can also be achieved by setting a synchronization point while performing an inversion operation.
  • the first register (BARW) and the second register (BARR) are provided in each CPU, and barrier synchronization processing can be performed by operating this register. It has become a structure. Therefore, a special instruction for accessing a place other than itself is not necessary, and the cost can be reduced. Furthermore, by realizing the first and second registers with memory-mapped registers, barrier synchronization processing can be realized by executing memory access instructions generally provided in each CPU, further reducing costs. I can plan.
  • Non-Patent Document 1 if the bits of the flag register can be written independently and in parallel, exclusive control of register access becomes unnecessary.
  • a special instruction such as a barrier synchronization instruction
  • a barrier synchronization instruction is assigned to the instruction set of each CPU. The necessity of mounting arises and the increase in cost will arise.
  • FIG. 7 is a schematic diagram showing a configuration example of the main part of the multiprocessor system according to the second embodiment of the present invention.
  • the configuration example in which the barrier write register BARW and the barrier read register BARR are separate registers (in the case of an address mapped register, an address is individually assigned) has been described.
  • the multiprocessor system shown in FIG. 7 is characterized in that the barrier write register BARW and the barrier read register BARR in FIG. 3 described above are integrated into a common barrier register BAR.
  • each of a plurality (eight in this case) of processor CPUs # 0 to # 7 includes an 8-bit barrier register BAR.
  • Each CPU # 0 to # 7 can perform write access only to the bit corresponding to itself in its own barrier register BAR, and can perform read access to the 8 bits of BAR. That is, for example, CPU # 0 can write access only to bit [0] of its own BAR. Similarly, CPUs # 1, # 2,. Only bits [1], [2],..., [7] can be write-accessed. Therefore, each CPU # 0 to # 7 writes the bit corresponding to itself in the BAR in the same manner as in the first embodiment, as in the case of writing the barrier write register BARW in the first embodiment. It is possible to perform barrier synchronization processing in the same manner as in FIG.
  • the area cost of registers and the like can be reduced, and the hardware cost can be further reduced. It becomes possible. However, for example, it is necessary to configure so that only one specific bit of its own BAR can be written by a mask write function, a read-modify-write function, or a function that allocates and manages an address for each bit. Depending on the case, a new control circuit may be required, or the processing time of the 1-bit write instruction may be increased.
  • FIG. 8 is a schematic diagram showing a configuration example of the main part of the multiprocessor system according to the third embodiment of the present invention.
  • one of a plurality of processor CPUs here, CPU # 0
  • this master takes the initiative to monitor the status of other CPUs waiting for synchronization.
  • the number of bits of the barrier read register BARR is reduced.
  • the master CPU # 0 has a 1-bit barrier write register BARW and 7 bits (here, in order to make the correspondence easy to understand, bits [0] are omitted and bits [1] to [7] A barrier read register BARR).
  • the other CPUs # 1 to # 7 include a 1-bit barrier write register BARW and a 1-bit barrier read register BARR.
  • each bit of the 7-bit BARR in the CPU # 0 and each BARW included in the CPUs # 1 to # 7 are connected by direct wiring.
  • the BARW of the CPU # 1 is connected to the bit [1] of the BARR of the CPU # 0, and similarly, the CPU # 2 is respectively connected to the bit [2], the bit [3],. , CPU # 3,..., CPU # 7's BARW are connected.
  • the BARW of CPU # 0 is connected by broadcast to the 1-bit BARR included in each of CPUs # 1 to # 7 by direct wiring.
  • FIG. 9 is an explanatory diagram showing an operation example of the barrier synchronization process when the configuration example of FIG. 8 is used.
  • each of the CPUs # 0 to # 7 executes a predetermined process (thread) (S901), and then performs a barrier synchronization process (S902).
  • the code is different between the master CPU # 0 and the other CPUs # 1 to # 7.
  • the master CPU # 0 confirms the synchronization waits of the other CPUs # 1 to # 7 and then sets the synchronization wait in its own BARW.
  • the barrier synchronization processing is performed by the other CPUs # 1 to # 7 detecting simultaneously with their own BARR.
  • FIG. 10 is an explanatory diagram showing an example of more detailed processing contents of the barrier synchronization processing in FIG.
  • CPU # 3 that has completed the predetermined processing inverts its BARW (initial value is zero) to “1” in accordance with the subsequent “inv rm” instruction.
  • This information is reflected in the BARR of the CPU # 0 via the above-described wiring block WBLK6 (in the example of FIG. 10, it is reflected in the bit [3]).
  • the CPU # 0 since the value of its own BARR becomes “111”, the CPU # 0 inverts its own BARW (initial value is zero) to “1” in accordance with the subsequent “inv r0” instruction. Proceed to the process. In parallel with this, the BARW information of the CPU # 0 is immediately reflected in the BARR of the CPUs # 1 to # 3 via the wiring block WBLK6. As a result, the CPUs # 1 to # 3, which are in the standby state, proceed to the subsequent processing because their own BARR is “1”. In this way, the barrier synchronization process is completed.
  • FIG. 11 is a schematic diagram showing a configuration example of main parts of a multiprocessor system according to Embodiment 4 of the present invention.
  • the multiprocessor system shown in FIG. 11 has a plurality of sets (three sets in this case) of barrier write registers BARW and barrier read registers BARR in each of the processor CPUs # 0 to # 7, compared to the configuration example of FIG. Is a feature.
  • the multiprocessor system of FIG. 11 includes a cluster CLS0 composed of CPUs # 0 to # 3 and a cluster CLS1 composed of CPUs # 4 to # 7, as in the case of FIG.
  • Each of the CPUs # 0 to # 7 is different from the case of FIG. 2 in that 1 bit ⁇ 3 sets of barrier write registers BARW [0] to [2] and 8 bits ⁇ 3 sets of barrier read registers BARR [0]. To [2].
  • the wiring block WBLK10 for the cluster CLS0 includes a 4-bit wiring for the set [0] from each BARW [0] included in the CPUs # 0 to # 3, and each BARR [0] included in the CPUs # 0 to # 3. Are connected to specific four bits (for example, bits [0] to [3]) by broadcast and extended toward the wiring block WBLK11. Similarly, 4-bit wiring for set [1] from each BARW [1] and 4-bit wiring for set [2] from each BARW [2] included in CPUs # 0 to # 3 are provided.
  • the WBLK 10 extends the 4-bit wirings for the set [1] and the set [2] toward the wiring block WBLK11.
  • the wiring block WBLK11 for the cluster CLS1 includes a 4-bit wiring for the set [0] from each BARW [0] included in the CPUs # 4 to # 7, and each BARR [0] included in the CPUs # 4 to # 7.
  • 4 bits (for example, bits [4] to [7]) are connected by broadcast and extended toward the wiring block WBLK10.
  • the 4-bit wiring for the set [1] from each BARW [1] and the 4-bit wiring for the set [2] from each BARW [2] included in the CPUs # 4 to # 7 are provided.
  • the WBLK 11 extends the 4-bit wirings for the set [1] and the set [2] toward the wiring block WBLK10.
  • the WBLK 10 has a 4-bit wiring for the set [0] extended from the WBLK 11 and specific 4 bits (for example, bits [4] to [7]) in each BARR [0] included in the CPUs # 0 to # 3. Connect to each by broadcast.
  • the 4-bit wiring for the set [1] and the 4-bit wiring for the set [2] extended from the WBLK 11 are respectively included in the BARR [1] included in the CPUs # 0 to # 3. For example, it connects to bits [4] to [7] and for example bits [4] to [7] in each BARR [2] included in CPUs # 0 to # 3.
  • the WBLK 11 has a 4-bit wiring for the set [0] extended from the WBLK 10 and specific 4 bits in each BARR [0] included in the CPUs # 4 to # 7 (for example, bits [0] to [3]). Connect to each by broadcast.
  • the 4-bit wiring for the set [1] and the 4-bit wiring for the set [2] extended from the WBLK 10 are respectively included in the BARR [1] included in the CPUs # 4 to # 7. For example, connection is made to bits [0] to [3] and, for example, bits [0] to [3] in each BARR [2] included in the CPUs # 4 to # 7.
  • CPUs # 0 and # 1 perform predetermined loop processing (do to endo), respectively, their own set [0] barrier write register BARW [0] and barrier read register BARR [0] ] Is used to perform barrier synchronization processing (BARRIER (0-1)).
  • CPUs # 2 and # 3 perform predetermined loop processing (do to endo), and then use their own BARW [0] and BARR [0] to perform barrier synchronization processing (BARRIER (0-2))
  • CPU # 4, # 5 and CPU # 6, # 7 also perform the barrier synchronization process (BARRIER (0-3)) and the barrier synchronization process (BARRIER (0-4)), respectively.
  • the barrier synchronization process is performed between the four CPUs. That is, the CPUs # 0 to # 3 perform the barrier synchronization processing (BARRIER (1-1)) using the barrier write register BARW [1] and the barrier read register BARR [1] for its set [1]. Similarly, the CPUs # 4 to # 7 perform barrier synchronization processing (BARRIER (1-2)) using their own BARW [1] and BARR [1]. After the barrier synchronization processing between the four CPUs is completed, the barrier synchronization processing is performed between the eight CPUs. That is, the CPUs # 0 to # 7 perform the barrier synchronization processing (BARRIER (2)) using the barrier write register BARW [2] and the barrier read register BARR [2] for its set [2].
  • BARRIER barrier synchronization processing
  • the CPU # 0, # 1 first reverses its own BARW [0] (for example, by an “inv rm [0]” instruction). '0').
  • the 0th bit (ie, BARW [0] of CPU # 0) and the 1st bit (ie, BARW [0] of CPU # 1) are detected. 0]) both become '1'.
  • the CPUs # 0 to # 7 first invert their BARW [2] (eg, the initial value is “0”) by an “inv rm [2]” instruction, for example. ')I do.
  • FIG. 13 is an explanatory diagram showing another example of the operation in the multiprocessor system of FIG. 11, and FIG. 14 is an explanatory diagram showing still another example of the operation in the multiprocessor system of FIG. .
  • CPU # 0 and CPU # 1 perform barrier synchronization processing (BARRIER (0-1)) using BARW [0] and BARR [0] for set [0].
  • BARRIER barrier synchronization processing
  • CPU # 2 and CPU # 3 are added, and CPU # 0 to # 3 perform barrier synchronization processing (BARRIER (1-1)) using BARW [1] and BARR [1] for set [1]. Is going.
  • CPU # 4 and CPU # 5 use the BARW [1] and BARR [1] for the set [1] to perform the barrier synchronization processing (BARRIER (1- 2)).
  • CPUs # 6 and # 7 are added, and the CPUs # 0 to # 7 use the BARW [2] and BARR [2] for the set [2] to perform barrier synchronization processing (BARRIER (2) )It is carried out.
  • the CPUs # 0 and # 1 perform the barrier synchronization processing (BARRIER (2)) using the BARW [2] and BARR [2] for the set [2].
  • the CPUs # 2 to # 4 and The CPUs # 5 to # 7 also perform barrier synchronization processing (BARRIER (2)) using BARW [2] and BARR [2] for the set [2], respectively.
  • the CPUs # 0 to # 7 perform barrier synchronization processing (BARRIER (0)) using BARW [0] and BARR [0] for the set [0].
  • each CPU can easily cope with it by providing a plurality of sets of barrier write registers BARW and barrier read registers BARR. It becomes.
  • the barrier read register BARR of each CPU has an 8-bit configuration corresponding to the number of CPUs, but of course the master CPU is used as described in the third embodiment (FIGS. 8 to 10). It is also possible to reduce the number of bits of BARR by defining. Further, as described in the second embodiment (FIG. 7), the barrier write register BARW and the barrier read register BARR can be integrated.
  • a configuration example and an operation example when the master CPU is defined as in the third embodiment will be described below.
  • FIG. 15 is an explanatory diagram showing an operation example obtained by modifying FIG. 12 in the multiprocessor system according to the fourth embodiment of the present invention.
  • CPU # 0 and CPU # 1 perform a barrier synchronization process (BARRIER (B1)) after performing a predetermined loop process.
  • BARRIER barrier synchronization process
  • BARRIER In the barrier synchronization processing (BARRIER (B1)), after CPU # 1 finishes its own loop processing, its own BARW [1] is incremented by +1 by the “inc r1 [1]” instruction (in other words, BARW [1] is increased). Invert).
  • the CPU # 0 is a master CPU, and after completing its own loop processing, the CPU # 1 checks whether or not the BARW [1] of the CPU # 1 is inverted by the “check r1 [1]” instruction. When the inversion is present, the CPU # 0 increments its own BARW [1] by +1 (inverts the BARW [1]), and the CPU # 1 executes the CPU # 0 by the “check r0 [1]” instruction.
  • B1 barrier synchronization process
  • CPU # 2 and CPU # 3 perform barrier synchronization processing (BARRIER (B2)), for example, with CPU # 2 as a master CPU.
  • barrier synchronization processing (BARRIER (B3)) is performed by the CPUs # 0 to # 3.
  • the CPU # 1 increments its own BARW [0] by +1 by the “inc r1 [0]” instruction (inverts the BARW [0]).
  • the CPU # 2 CPU # 3 also inverts its own BARW [0] by an “inc r2 [0]” instruction and an “inc r3 [0]” instruction, respectively.
  • the CPU # 0 which is the master CPU, uses the “check r1 [0]” instruction, the “check r2 [0]” instruction, and the “check r3 [0]” instruction to execute the BARW [ 0] is checked. If all are inverted, CPU # 0 increments its own BARW [0] by +1 (inverts BARW [0]), and CPUs # 1 to # 3 execute the “check r0 [0]” instruction. The inversion of BARW [0] of this CPU # 0 is detected. Thereby, the barrier synchronization process (BARRIER (B3)) is completed.
  • BARRIER B3
  • CPU # 0 only needs to read the BARW value of CPUs # 1 to # 3, and CPU # 1 can read the BARW value of CPU # 0.
  • the CPU # 2 only needs to read the BARW values of the CPU # 3 and the CPU # 0, and the CPU # 3 only needs to read the BARW values of the CPU # 2 and the CPU # 0.
  • CPU # 0 only needs to read the value of BARW of CPUs # 1 to # 7
  • CPU # 1 only needs to read the value of BARW of CPU # 0.
  • CPU # 2 only needs to read the BARW values of CPU # 3 and CPU # 0, and CPU # 3 only needs to read the BARW values of CPU # 2 and CPU # 0.
  • the CPU # 4 only needs to read the BARW values of the CPUs # 5 to # 7 and the CPU # 0, and the CPU # 5 only needs to read the BARW values of the CPU # 4 and the CPU # 0.
  • each CPU including the barrier synchronization processing of a plurality of hierarchies ( Thread) can be easily handled.
  • multi-level barrier synchronization processing becomes indispensable as the number of CPUs increases.
  • a beneficial effect can be obtained by using the multiprocessor system of the fourth embodiment.
  • FIG. 16 is a schematic diagram showing a configuration example of main parts of a multiprocessor system according to the fifth embodiment of the present invention.
  • the number of bits of the barrier write register BARW in each of the CPUs # 0 to # 7 is n bits (n ⁇ 2) as compared with the configuration example of FIG. 2 described in the first embodiment.
  • the number of bits of the barrier read register BARR is (8 ⁇ n) bits. That is, it is a configuration example in which a number (version number) can be set in BARW.
  • the number of wirings from the wiring block WBLK20 for the cluster CLS0 to the wiring block WBLK21 for the cluster CLS1 and the number of wirings from the WBLK21 to the WBLK20 are respectively ((8 ⁇ n) / 2). Further, for example, in WBLK20 and WBLK21, the n bits of BARW in each of CPUs # 0 to # 7 are wired by broadcast to the corresponding n bits in BARR. The number of wiring is increasing. Since other configurations are the same as those in FIG. 2, detailed description thereof is omitted.
  • FIG. 17 is an explanatory diagram showing an example of the operation of the multiprocessor system of FIG.
  • the first layer loop processing MT1, the second layer loop processing MT2_1, MT2_2, and the third layer are processed for each of the CPUs # 0 to # 7.
  • Processing contents including hierarchical loop processing MT3_1 to MT3_4 are allocated.
  • the processing for the three layers is realized by using different sets of BARW and BARR.
  • CPU # 0 and CPU # 1 perform a barrier synchronization process (BARRIER (0-1)) after performing a predetermined loop process.
  • CPUs # 2 and # 3, CPUs # 4 and # 5, and CPUs # 6 and # 7 also perform barrier synchronization processing (BARRIER (0-2)) and (BARRIER ( 0-3)) and (BARRIER (0-4)).
  • the barrier synchronization processing of the third layer is performed as a synchronization point when “xx1 (x is an arbitrary value)” is set in n bits (3 bits) of BARW.
  • the barrier synchronization process (BARRIER (0-1)) is completed when both r0 and r1 are “xx1”.
  • the second layer barrier synchronization processing is performed. That is, CPUs # 0 to # 3 perform barrier synchronization processing (BARRIER (0-5)), and CPUs # 4 to # 7 perform barrier synchronization processing (BARRIER (0-6)). These barrier synchronization processes in the second layer are performed when “x1x” is set in n bits (3 bits) of BARW as a synchronization point.
  • each of the CPUs # 0 to # 3 starts with a specific 1 bit (in the middle here) of 3 bits in its own BARW by an “inv rm” instruction. Is inverted).
  • the 3-bit values of the register fields (corresponding to r0 to r3) corresponding to the CPUs # 0 to # 3 in the BARR of the CPUs # 0 to # 7 are “ x1x ′′.
  • BARRIER barrier synchronization processing
  • the first layer barrier synchronization processing is performed. That is, the CPUs # 0 to # 7 perform barrier synchronization processing (BARRIER (0-7)).
  • the barrier synchronization processing in the first layer is performed when “1xx” is set in n bits (3 bits) of BARW as a synchronization point.
  • each of the CPUs # 0 to # 7 starts with a specific 1 bit (here, the leftmost bit) in 3 bits of its own BARW by the “inv rm” instruction. ).
  • the 3-bit values of the register fields (corresponding to r0 to r7) corresponding to the CPUs # 0 to # 7 in the BARR of the CPUs # 0 to # 7 are “ 1xx ".
  • the barrier synchronization processing of the third layer described above performs the barrier synchronization processing. Since the bit is already “1”, this time, the case where “xx0 (x is an arbitrary value)” is set in the 3 bits of BARW is set as the synchronization point. As a result, as described in the first embodiment, the reset operation for returning the inverted bit to the original state can be omitted, and the speed can be increased.
  • FIG. 18 is an explanatory diagram showing another example of the operation of the multiprocessor system of FIG. FIG. 18 shows an operation example when the master CPU is defined as described in the third embodiment.
  • the number of CPUs is four will be described as an example.
  • the second layer loop processing MT2_1 executed by the CPUs # 0 and # 1
  • the CPUs # 2 and # 3 A second layer loop process MT2_2 to be executed is included.
  • the register field is r0 to r3 when the number of CPUs is four, and 2 bits (log 2 4) are included in each of r0 to r3.
  • the CPUs # 0 and # 1 perform the second layer barrier synchronization processing (BARRIER (B1)) after completing the predetermined loop processing.
  • BARRIER (B1) the barrier synchronization process
  • the CPU # 1 inverts one of the two bits in its own BARW by an “inv r1 (1)” instruction after completing a predetermined loop process.
  • the CPU # 0 is a master CPU, and after completing a predetermined loop process, confirms the presence or absence of the bit inversion of the BARW by the CPU # 1 by the “check r1 (1)” instruction.
  • CPU # 0 inverts one of the two bits in its BARW by the “inv r0 (1)” instruction.
  • the barrier synchronization processing (BARRIER (B1)) is completed when the CPU # 1 detects the bit inversion operation of BARW by the CPU # 0 by the “check r0 (1)” instruction.
  • the CPUs # 2 and # 3 perform the second layer barrier synchronization processing (BARRIER (B2)).
  • the CPUs # 0 to # 3 perform the first layer barrier synchronization processing (BARRIER (B3)).
  • BARRIER (B3) the CPU # 1 inverts the other bit in the two bits of its own BARW by the “inv r1 (0)” instruction.
  • the CPU # 2 and the CPU # 3 The other bit in the two bits of its own BARW is inverted by the “inv r2 (0)” instruction and the “inv r3 (0)” instruction, respectively.
  • the CPU # 0, which is the master CPU, determines that each of the CPUs # 1 to # 3 is in BARW by the “check r1 (0)” instruction, the “check r2 (0)” instruction, and the “check r3 (0)” instruction. Check if the other bit in 2 bits is inverted. If all are inverted, CPU # 0 inverts the other bit in the 2 bits of its own BARW, and CPUs # 1 to # 3 perform this check with CPU # 0 by the “check r0 (0)” instruction. The bit inversion operation of BARW is detected. Thereby, the barrier synchronization process (BARRIER (B3)) is completed.
  • BARRIER B3
  • FIG. 19 is an explanatory diagram showing an example of detailed source code used in the barrier synchronization process (BARRIER (B1)) in the operation example of FIG.
  • BARRIER B1
  • CPU # 1 performs an EXOR operation on variables “ver” and “1”, and substitutes the value of “ver” obtained as a result into variable “r1”. That is, when the value of “ver” is “00”, “01” is assigned to “r1” via the EXOR operation. Conversely, when the value of “ver” is “01”, the EXOR operation is performed. Then, “00” is substituted into “r1”. This corresponds to the “inv r1 (1)” instruction in FIG.
  • the processing contents of each CPU including the barrier synchronization processing in a plurality of layers ( Thread) can be easily handled.
  • multi-level barrier synchronization processing becomes indispensable as the number of CPUs increases.
  • a beneficial effect can be obtained by using the multiprocessor system of the fifth embodiment.
  • the barrier write register BARW and the barrier read register BARR are separate registers. However, as a matter of course, as shown in FIG. is there.
  • FIG. 20 is an explanatory diagram showing an example of another operation using the configuration example of FIG. 16 in the multiprocessor system according to the sixth embodiment of the present invention.
  • n bits that is, version number
  • the barrier write register BARW in FIG. 16 are used for purposes other than the hierarchical segmentation as described in the fifth embodiment.
  • each of the CPUs # 0 to # 7 performs a predetermined process (S2001) and then performs a barrier synchronization process (BARRIER (0-1)) with the synchronization point set to “1”.
  • a barrier synchronization process BARRIER (0-1)
  • the synchronization point is set to ‘2’
  • barrier synchronization processing BARRIER (0-2)
  • the barrier synchronization process BARRIER (0-3)
  • the barrier synchronization process (BARRIER (0-3)) is performed by setting the synchronization point to “3”.
  • the CPU waits until the BARW values of the CPUs # 0 to # 7 all become “3” by the “” instruction.
  • n bits such as BARW are 2 bits
  • version numbers from '0' to '3' can be used.
  • the barrier synchronization processing is performed again by returning to “0”.
  • the version number As a direct value, it is possible to synchronize one CPU with another CPU with version number '1', and synchronize one CPU with another CPU with version number '2'. Become. In this case, managing the synchronization by the version number makes it possible to perform the synchronization process more easily than when only 1-bit information is available.
  • FIG. 21 is a schematic diagram showing a configuration example of main parts of a multiprocessor system according to the seventh embodiment of the present invention.
  • the barrier write registers BARW [0], [1], and [2] in the CPUs # 0 to # 7 are compared with the configuration example of FIG. 11 described in the fourth embodiment.
  • the number of bits is n bits (n ⁇ 2), and the number of bits of each of the barrier read registers BARR [0], [1], [2] is (8 ⁇ n) bits. . That is, as described in the fourth embodiment, in addition to the configuration in which a plurality of sets of BARW and BARR are provided, the version number as described in the fifth and sixth embodiments can be set in each set. ing.
  • FIG. 22 is an explanatory diagram showing an example of use of the multiprocessor system of FIG. Here, a case where the number of CPUs is four will be described as an example.
  • the CPUs # 0 and # 1 perform the second layer barrier synchronization process (BARRIER (B1)) after completing the predetermined loop process, and the CPUs # 2 and # 3 also execute the second loop synchronization process after completing the predetermined loop process.
  • the second layer barrier synchronization processing (BARRIER (B2)) is performed. After finishing the second layer barrier synchronization processing, the CPUs # 0 to # 3 perform the first layer barrier synchronization processing (BARRIER (B3)).
  • n-bit (n ⁇ 2) version number can be set in BARW or the like included in each CPU.
  • the rotation number of each loop process can be managed using the version number for the loop processes MT, MT2_1 and MT2_2 of each layer.
  • MT2_1 is exited when the barrier synchronization process (BARRIER (B1)) is performed twice (that is, the loop process MT2_1 is rotated twice), MT2_2 is exited when the loop process MT2_2 is rotated three times, and the loop process MT1 is performed 4 It is possible to perform an operation to exit MT1 at the stage of rotation.
  • BARRIER barrier synchronization process
  • this version number can also be used as a breakpoint stop condition during program debugging. Further, it can be utilized when performing hot spot dynamic extraction or the like.
  • the multiprocessor system according to an embodiment of the present invention is a technology that is particularly useful when applied to a system for a field in which hardware cost and development time are largely limited, such as a system for embedded use.
  • the present invention is not limited and can be widely applied to all multiprocessor systems.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

 各プロセッサCPU#0~#7内に、バリアライトレジスタBARWとバリアリードレジスタBARRを設け、専用の配線ブロックWBLK3を用いて各BARWを各BARRに配線する。例えば、CPU#0の1ビットのBARWは、WBLK3を介してCPU#0~#7に含まれる8ビットの各BARRの1ビット目に接続され、CPU#1の1ビットのBARWは、WBLK3を介してCPU#0~#7に含まれる8ビットの各BARRの2ビット目に接続される。例えば、CPU#0は、自身のBARWに情報を書き込むことでCPU#1~#7に同期待ちを通知し、自身のBARRを読むことでCPU#1~#7が同期待ちか否かを認識する。したがって、バリア同期処理に伴い、特殊な専用命令は不要であり、また高速に処理を行うことができる。

Description

マルチプロセッサシステムおよびマルチプロセッサシステムの同期方法
 本発明は、マルチプロセッサシステムおよびその同期方法に関し、特に、バリア同期処理をハードウェアで行うマルチプロセッサシステムおよびその同期方法に適用して有益な技術に関するものである。
 例えば、特許文献1には、放送機能付きのシステムバスにバスインタフェースを介して接続されたN個のプロセッサからなるマルチプロセッサシステムにおいて、各プロセッサ間の同期を行う方式が記載されている。具体的には、各プロセッサは、N個のプロセッサに各ビットが対応するNビットの同期用レジスタを備える。各プロセッサは、自身のフェーズが完了した際に同期用レジスタの対応ビットに‘1’を設定すると共に、システムバスを介して他のプロセッサにも通知を行い、他のプロセッサは、この通知を受けて同期用レジスタの更新を行う。これによって、各プロセッサは、同期用レジスタの全ビットの‘1’を認識することで同期処理を行うことができる。
 また、特許文献2には、それぞれが複数のプロセッサを含む複数のクラスタ間にクラスタ間通信レジスタを設けてクラスタ間のバリア同期を行う方式が記載されている。クラスタ間通信レジスタには、クラスタ数が設定され、各クラスタ内に存在する代表プロセッサがこのクラスタ数を1減算していくことで、0になった時点でバリア同期処理を完結することができる。
 また、特許文献3および特許文献4には、マルチプロセッサシステムの共有メモリ上に各プロセッサ対応の同期フラグ領域を設けることでソフトウェア同期を行う方式が記載されている。さらに、特許文献5には、階層構造のキャッシュを備えたマルチプロセッサシステムにおいて、その階層構造のキャッシュを利用して同期を行う方式が記載されている。具体的には、例えば、プロセッサモジュール内で、CPU0とCPU1にそれぞれ一次キャッシュが設けられ、この2つの一次キャッシュの上位に共通の二次キャッシュが設けられる場合、CPU0で実行する複数スレッドの同期を一次キャッシュ上に確保したフラグ変数で行い、CPU0とCPU1の同期を二次キャッシュ上に確保したフラグ変数で行う。
 また、非特許文献1には、P個のプロセッサに対して共通に設けられる1個のPビットレジスタと、このPビットレジスタの値が全てゼロとなった場合を検出し、その際の検出信号をP個のプロセッサに向けて送信する検出回路等からなる構成が記載されている。P個のプロセッサで並列処理を実行した後にバリア同期を行う場合、各プロセッサは、自身の処理が終了した段階でPビットレジスタの対応ビットにゼロを書き込む。全てのプロセッサの処理が完了した際には、全てのプロセッサに向けて検出信号が送信されるため、これによってバリア同期が可能となる。なお、非特許文献1には、多重ループを並列処理で行うため、(P-1)組のPビットレジスタからなるレジスタアレイを設ける構成も示されている。
特開平2-105961号公報 特開平10-91591号公報 特開2000-305919号公報 特開2005-71109号公報 特開2006-259821号公報 C.J.Beckmann, C.D.Polychronopoulos、「Fast barrier synchronization hardware」、Supercomputing '90. Proceedings of Publication、1990年11月、p.180-189
 近年、半導体チップの微細化、高速化に伴うリーク電流や消費電力等の問題により、動作周波数の向上に代わる性能向上策としてマルチプロセッサ(又はマルチコア)技術が用いられてきている。マルチプロセッサシステムでは、通常、タスクやプロセス等と呼ばれる一つの処理内容をそれぞれスレッド等と呼ばれる複数の処理単位に分割し、この複数のスレッドを各プロセッサに適宜割り当てることで複数のプロセッサによる並列処理が実行される。したがって、複数のスレッド間には、例えばあるスレッドの処理結果を別のスレッドが用いて更なる処理を行うといったように依存関係が生じ、これに伴い、互いに依存した処理を行う複数のプロセッサが同期ポイントで待ち合わせを行うという所謂バリア同期が必要となる。
 このようなバリア同期は、ハードウェアによってもソフトウェアによっても実現できる。例えば、前述した特許文献3、特許文献4および特許文献5には、ソフトウェアによるバリア同期の実現方法が記載されている。ソフトウェアによる方法は、要するに、各プロセッサで共有されるメモリ上にフラグ変数を設定するというものである。各プロセッサは、自身の処理が完了した際にこのフラグ変数を更新ならびに参照することで、自身以外のプロセッサの処理が終了しているかを認識することができる。
 しかしながら、ソフトウェアによる方法では、各プロセッサが共有メモリ上の共通フラグ変数にアクセスすることになるため、バリア同期を完結するのに時間を要してしまう。すなわち、単純なメモリアクセス時間に加えて、共有メモリへのアクセス権を得るまでの調停時間も多く必要とされる。例えば、特許文献5に示されるように、特定したキャッシュメモリ上にフラグ変数を確保することである程度の高速化は図れるが、例えば、キャッシュメモリの特定手段が必要であったり、ライトバックが発生すると速度が低下することなどから特殊なキャッシュメモリの制御などが必要になると考えられる。
 また、例えば、前述した特許文献1、特許文献2および非特許文献1には、ハードウェアによるバリア同期の実現方法が記載されている。特許文献2や非特許文献1の方法は、要するに、複数のプロセッサに対して共通のフラグレジスタを設け、このフラグレジスタの書き込みや参照によってバリア同期を行うものである。この場合、このフラグレジスタへのアクセスを排他的に制御する必要があるため、この処理に時間を要する恐れがある。一方、特許文献1の方法は、前述したフラグレジスタを各プロセッサが備え、それぞれのフラグレジスタのコヒーレンシ(一貫性)を共通のシステムバスを介して保つようなものとなっている。しかしながら、システムバスを用いると、バスのアクセス権を確保するための調停時間が必要となるため、高速なバリア同期処理が困難となる。
 本発明は、このようなことを鑑みてなされたものであり、その目的の一つは、高効率なバリア同期処理を実現可能なマルチプロセッサシステムおよびその同期方法を提供することにある。本発明の前記ならびにその他の目的と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。
 本願において開示される発明のうち代表的なものの概要を簡単に説明すれば、次の通りである。
 本発明の一実施の形態によるマルチプロセッサシステムは、N(N≧2)個のプロセッサと、このN個のプロセッサ内にそれぞれ設けられたN個のバリアライトレジスタ(第1レジスタ)およびN個のバリアリードレジスタ(第2レジスタ)と、第1手段とを有するものとなっている。第1手段は、N個のプロセッサ内のいずれかのプロセッサがバリア同期に伴い自身に設けられたバリアライトレジスタに第1情報を書き込んだ際に、この第1情報を他のプロセッサに設けられたバリアリードレジスタに伝送するものとなっている。この第1手段は、例えば、N個のバリアライトレジスタをN個のバリアリードレジスタに直接的に配線する配線ブロックによって実現される。
 このような構成を用いると、あるプロセッサが自身の同期待ちを意味する第1情報を自身のバリアライトレジスタに書き込むことで、この第1情報を即座に他のプロセッサのバリアリードレジスタに反映させることができる。したがって、他のプロセッサは、自身のバリアリードレジスタを読むことで、自身以外のプロセッサが同期待ちか否かを即座に知ることができるため、高速なバリア同期処理が実現可能となる。この際に、バリアライトレジスタからバリアリードレジスタへの情報伝送をシステムバスを介さずに専用の配線ブロックを用いて行うことで、高速化が図れる。
 また、各プロセッサは、自身の同期待ちを他のプロセッサに通知する際には自身のバリアライトレジスタに第1情報を書き込み、他のプロセッサの同期待ちの状況を知る際には、自身のバリアリードレジスタを読めばよいため、CPUに特殊な命令セットを追加する必要がなく、低コストでバリア同期処理が実現可能となる。さらに、自身以外のプロセッサがバリアライトレジスタに第1情報を書き込んだ際に、この第1情報が、自身のプロセッサ内のバリアリードレジスタに向けて、割り込み等の間接的形態ではなく直接的に反映される構成となっているため、自身のプロセッサは、この反映に伴い自身が現在行っている処理を阻害されることはない。以上のようなことから、高効率なバリア同期処理が実現可能となる。
 また、本発明の一実施の形態のマルチプロセッサシステムは、前述したようなバリアライトレジスタおよびバリアリードレジスタを、各プロセッサ内に複数セット備えたものとなっている。これによって、例えば、複数階層のバリア同期処理を含んだ処理内容を実行する際に、各階層毎に1個のセットを割り当てることができ、このようなバリア同期処理を容易に実現可能となる。
 さらに、本発明の一実施の形態のマルチプロセッサシステムは、前述したようなバリアライトレジスタが複数ビットから構成されるものとなっている。これによって、同期ポイントをバージョンナンバーとして複数種類設定でき、高度または複雑なバリア同期処理に柔軟に対応可能となる。例えば、このバリアライトレジスタの複数ビットの各ビットに前述したような複数階層の各階層を割り当てることができる。また、前述したように、バリアライトレジスタおよびバリアリードレジスタを複数セット設け、加えて、前述したようなバージョンナンバーも併用すれば、より高度または複雑なバリア同期処理にも柔軟に対応可能となる。
 本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば、次の通りである。
 本発明の一実施の形態によるマルチプロセッサシステムを用いることで、高効率なバリア同期処理を実現可能となる。
本発明の実施の形態1によるマルチプロセッサシステムにおいて、その全体構成の一例を示すブロック図である。 本発明の実施の形態1によるマルチプロセッサシステムにおいて、その主要部の構成例を示す概略図である。 本発明の実施の形態1によるマルチプロセッサシステムにおいて、その主要部の他の構成例を示す概略図である。 図2および図3のマルチプロセッサシステムにおいて、その動作の一例を示す説明図である。 図4におけるバリア同期処理の詳細な処理内容の一例を示す説明図である。 図2および図3のマルチプロセッサシステムにおいて、その動作の他の一例を示す説明図である。 本発明の実施の形態2によるマルチプロセッサシステムにおいて、その主要部の構成例を示す概略図である。 本発明の実施の形態3によるマルチプロセッサシステムにおいて、その主要部の構成例を示す概略図である。 図8の構成例を用いた場合のバリア同期処理の動作例を示す説明図である。 図9におけるバリア同期処理のより詳細な処理内容の一例を示す説明図である。 本発明の実施の形態4によるマルチプロセッサシステムにおいて、その主要部の構成例を示す概略図である。 図11のマルチプロセッサシステムにおいて、その動作の一例を示す説明図である。 図11のマルチプロセッサシステムにおいて、その動作の他の一例を示す説明図である。 図11のマルチプロセッサシステムにおいて、その動作の更に他の一例を示す説明図である。 本発明の実施の形態4によるマルチプロセッサシステムにおいて、図12を変形した動作例を示す説明図である。 本発明の実施の形態5によるマルチプロセッサシステムにおいて、その主要部の構成例を示す概略図である。 図16のマルチプロセッサシステムにおいて、その動作の一例を示す説明図である。 図16のマルチプロセッサシステムにおいて、その動作の他の一例を示す説明図である。 図18の動作例において、そのバリア同期処理で用いる詳細なソースコードの一例を示す説明図である。 本発明の実施の形態6によるマルチプロセッサシステムにおいて、図16の構成例を用いた他の動作の一例を示す説明図である。 本発明の実施の形態7によるマルチプロセッサシステムにおいて、その主要部の構成例を示す概略図である。 図21のマルチプロセッサシステムにおいて、その使用例を示す説明図である。
 以下、本発明の実施の形態を図面に基づいて詳細に説明する。実施の形態を説明するための全図において、同一の部材には原則として同一の符号を付し、その繰り返しの説明は省略する。また、以下の実施の形態においては便宜上その必要があるときは、複数のセクションまたは実施の形態に分割して説明するが、特に明示した場合を除き、それらはお互いに無関係なものではなく、一方は他方の一部または全部の変形例、詳細、補足説明等の関係にある。
 また、以下の実施の形態において、要素の数等(個数、数値、量、範囲等を含む)に言及する場合、特に明示した場合および原理的に明らかに特定の数に限定される場合等を除き、その特定の数に限定されるものではなく、特定の数以上でも以下でも良い。さらに、以下の実施の形態において、その構成要素(要素ステップ等も含む)は、特に明示した場合および原理的に明らかに必須であると考えられる場合等を除き、必ずしも必須のものではないことは言うまでもない。同様に、以下の実施の形態において、構成要素等の形状、位置関係等に言及するときは、特に明示した場合および原理的に明らかにそうでないと考えられる場合等を除き、実質的にその形状等に近似または類似するもの等を含むものとする。このことは、上記数値および範囲についても同様である。
 (実施の形態1)
 図1は、本発明の実施の形態1によるマルチプロセッサシステムにおいて、その全体構成の一例を示すブロック図である。図1に示すマルチプロセッサシステムは、例えば、プロセッサ等を含む半導体チップCPと、SRAM(Static Random Access Memory)等の外部メモリMEM1およびDDR2-SDRAM(Double Data Rate 2-Synchronous Dynamic Random Access Memory)等の外部メモリMEM2によって構成される。半導体チップCPは、特に制限されないが、シリコンなどの半導体基板に公知のCMOS製造方法によって形成されている。
 半導体チップCPには、特に制限されないが、システムバスSHWYが含まれる。このSHWYには、複数(ここでは2個)のクラスタCLS0,1、メモリコントローラLBSC,DBSC、共有メモリCSM、DMA(Direct Memory Access)コントローラDMAC0,DMAC1、周辺バスブリッジHPB等が接続される。HPBを介した先には、クロック生成部CPG、汎用IOインタフェース部GPIO、タイマ部TMU0~3、割り込みコントローラINTCなどが接続される。メモリコントローラLBSCは、外部メモリ(SRAM)MEM1を制御し、メモリコントローラDBSCは、外部メモリ(DDR2-SDRAM)MEM2を制御する。なお、クラスタとは、概念的には、所謂クラスタリングによって分散された個々のシステム単位を意味し、信頼性や高速性の観点から一般的に用いられている。
 クラスタCLS0には、スヌープバスSNB0およびそれを制御するスヌープバスコントローラSNC0が含まれる。スヌープバスSNB0には、複数(ここでは4個)のプロセッサ(CPU:Central Processing Unit)CPU#0~#3が接続される。SNB0およびSNC0は、各CPU#0~#3に含まれるキャッシュメモリの更新動作等を監視し、各CPU#0~#3間でキャッシュメモリのコヒーレンシを維持できるように制御する。このように、システムバスSHWYを介さずにキャッシュメモリのコヒーレンシを制御することで、システム全体の高速化が図れる。また、クラスタCLS0には、デバッグコントローラDBG0なども含まれている。
 各CPU#0~#3のそれぞれは、CPUモジュールCPU_MD、浮動小数点数演算部FPU、キャッシュコントローラCCN、システムバス用インタフェースBIC、ユーザメモリURAM、ローカルメモリIL,OL、および一次キャッシュメモリI$,O$などを含んでいる。各CPU#0~#3は、自身の一次キャッシュメモリI$,O$を最下位メモリとして所望の処理を行う。この際に、上位メモリに対するライトバック等が生じると、SHWYを介して外部メモリMEM1,MEM2等へのアクセスが発生する。なお、ここでは、簡略的に一次キャッシュメモリのみを示しているが、勿論、クラスタCLS0内に各CPU#0~#3で共通となる二次キャッシュメモリ等を設けてもよい。
 クラスタCLS1は、クラスタCLS0と同様の構成となっている。すなわち、クラスタCLS1には、スヌープバスSNB1およびスヌープバスコントローラSNC1が含まれ、SNB1には、複数(ここでは4個)のプロセッサCPU#4~#7が接続される。また、クラスタCLS1には、デバッグコントローラDBG1なども含まれている。各CPU#4~#7内の構成は、クラスタCLS0の場合と同様であるため詳細な説明は省略する。なお、ここでは、4CPU×2クラスタのマルチプロセッサ(マルチコア)システムの構成例を示したが、勿論、クラスタ内のCPU数やクラスタ数等は適宜変更可能である。
 図2は、本発明の実施の形態1によるマルチプロセッサシステムにおいて、その主要部の構成例を示す概略図である。図2に示すマルチプロセッサシステムは、図1に示したプロセッサCPU#0~#3からなるクラスタCLS0と、プロセッサCPU#4~#7からなるクラスタCLS1に加えて、配線ブロックWBLK0,WBLK1を備えた構成となっている。各CPU#0~#7のそれぞれは、1ビットのバリアライトレジスタBARW(第1レジスタ)と、CPU数(ここでは8個)に対応するビット数(ここでは8ビット)を持つバリアリードレジスタBARR(第2レジスタ)を備えている。
 配線ブロックWBLK0は、CLS0内のCPU#0~#3に含まれる各BARWからの配線(4ビット分)を、CPU#0~#3に含まれる各BARR内の特定の4ビット(例えばビット[0]~[3])にそれぞれブロードキャストで接続すると共に配線ブロックWBLK1に向けて延伸させる。同様に、配線ブロックWBLK1は、CLS1内のCPU#4~#7に含まれる各BARWからの配線(4ビット分)を、CPU#4~#7に含まれる各BARR内の特定の4ビット(例えばビット[4]~[7])にそれぞれブロードキャストで接続すると共に配線ブロックWBLK0に向けて延伸させる。また、WBLK0は、WBLK1から延伸されてきた配線(4ビット分)を、CPU#0~#3に含まれる各BARR内の残りの4ビット(例えばビット[4]~[7])にそれぞれブロードキャストで接続する。同様に、WBLK1は、WBLK0から延伸されてきた配線(4ビット分)を、CPU#4~#7に含まれる各BARR内の残りの4ビット(例えばビット[0]~[3])にそれぞれブロードキャストで接続する。
 したがって、例えば、CPU#0が自身のBARWに情報を書き込んだ場合には、この書き込んだ情報が、CPU#0~#7に含まれる各BARR内の特定の1ビット(例えばビット[0])に配線ブロックWBLK0,WBLK1を介して一斉に反映される。また、例えば、CPU#7が自身のBARWに情報を書き込んだ場合には、この書き込んだ情報が、CPU#0~#7に含まれる各BARR内の特定の1ビット(例えばビット[7])に配線ブロックWBLK0,WBLK1を介して一斉に反映される。なお、特に限定はされないが、WBLK0は、図1におけるスヌープバスコントローラSNC0内に形成し、WBLK1は、スヌープバスコントローラSNC1内に形成することができる。
 図3は、本発明の実施の形態1によるマルチプロセッサシステムにおいて、その主要部の他の構成例を示す概略図である。図3に示すマルチプロセッサシステムは、図2の場合と異なり、8個のCPU#0~#7がクラスタCLS0,CLS1によって階層化されずにフラット状態である場合の構成例である。図3の構成例では、図2の場合と同様に、各CPU#0~#7に含まれる1ビットのバリアライトレジスタBARWと8ビットのバリアリードレジスタBARRが相互に接続されている。この際の接続関係は、実質的には図2の場合と同様であるが、レイアウト概念が図2の場合とは異なる。
 すなわち、図2の場合では、複数のクラスタにそれぞれ対応して複数の配線ブロックを設けている。そして、あるクラスタに対応した配線ブロック内では、自身のクラスタ内に含まれるBARWとBARRの相互接続を行い、自身のクラスタにおけるBARWの情報をクラスタ情報として束ねて他のクラスタへ伝送すると共に、他のクラスタからのクラスタ情報を受けて、自身のクラスタのBARRに伝送する。一方、図3の場合では、各CPU#0~#7に対応して一つの配線ブロックWBLK3を設けている。そして、WBLK3では、CPU#0~#7に含まれる各BARWからの配線(8ビット分)が、CPU#0~#7に含まれる各BARRの8ビットにそれぞれ接続されている。
 なお、図2や図3の構成例において、バリアライトレジスタBARWやバリアリードレジスタBARRは、例えば、CPUがレジスタアクセス命令を実行することでアクセスが可能なコントロールレジスタ等で実現したり、あるいはCPUがメモリアクセス命令を実行することでアクセスが可能なメモリマップドレジスタなどで実現することができる。メモリマップドレジスタを用いた場合には、CPUの命令セットなどを追加する必要がないため、コントロールレジスタ等で実現する場合と比べてコスト面又は容易性の観点から優位となる。メモリマップドレジスタは、特に限定はされないが、例えば、図1のキャッシュコントローラCCN内に設ける。
 図4は、図2および図3のマルチプロセッサシステムにおいて、その動作の一例を示す説明図である。マルチプロセッサシステムでは、例えば、図4に示すような処理内容を用いることで、省電力化を図ることができる。図4において、まず、全てのCPU#0~#7は、高速動作が必要な所定の処理(スレッド)を高速クロック周波数で並列に実行する(S401)。この際に、各CPUは、自身の処理を完了後に自身以外のCPUと待ち合わせを行うバリア同期処理を実行する(S402)。バリア同期処理が完了すると、マスタCPU(例えばCPU#0)等が、全てのCPUのクロック周波数を下げる命令を発行する(S403)。これを受けて、例えば、図1のクロック生成部CPGなどがクロック周波数を低下させる。
 続いて、全てのCPU#0~#7は、高速動作が不必要な所定の処理(スレッド)を低速のクロック周波数を用いて並列に実行する(S404)。この際に、各CPUは、自身の処理を完了後に自身以外のCPUと待ち合わせを行うバリア同期処理を実行する(S405)。バリア同期処理が完了すると、マスタCPU(例えばCPU#0)等が、全てのCPUのクロック周波数を上げる命令を発行する(S406)。その後、全てのCPU#0~#7は、再び、高速動作が必要な所定の処理を高速クロック周波数で並列に実行する(S407)。
 図5は、図4におけるバリア同期処理の詳細な処理内容の一例を示す説明図である。図5では、簡略化のため、全CPU数が4個(CPU#0~#3)であるものと仮定して説明を行う。まず、各CPUが実行するコード内では、所定の処理を行うコード(「do~enddo」に該当)の後にバリア同期処理の為のコードが付加されている。バリア同期処理の為のコードは、ここでは、「inv rm」と「check r0-r3=1111」となっている。
 「inv rm」は、バリアライトレジスタBARWの情報を反転させる命令を意味する。「rm」はBARWに対応するソフトウェア上のレジスタフィールドを意味し、添字「m」はCPU番号を意味する。例えば、「inv r0」はCPU#0のBARWの情報を反転させる命令、「inv r1」はCPU#1のBARWの情報を反転させる命令となる。「check r0-r3=1111」は、バリアリードレジスタBARRの4ビットの情報が全て「1」となるまで待機させる命令を意味する。この命令では、レジスタフィールド「r0-r3」がBARRを表すことになるが、BARWとBARRは相互に接続されており、ソフトウェア的には、一つのレジスタフィールドで取り扱うことができる。すなわち、例えば、「r0」は、CPU#0のBARWであると共に、CPU#0~#3に含まれるBARRのビット[0]でもあり、「r3」は、CPU#3のBARWであると共に、CPU#0~#3に含まれるBARRのビット[3]でもある。
 図5の例では、まず、最初に所定の処理を完了したCPU#0が、その後の「inv rm」命令に伴い自身のBARW(初期値はゼロとする)を反転させて「1」にする。この情報は、前述した配線ブロックWBLKを介して全CPUのBARRに反映される(図5の例ではビット[0]に反映)。その後、CPU#0は、「check r0-r3=1111」命令を実行するが、自身のBARRの値が「1000」であるため待機状態となる。次いで、所定の処理を完了したCPU#2が、その後の「inv rm」命令に伴い自身のBARW(初期値はゼロとする)を反転させて「1」にする。この情報は、前述した配線ブロックWBLKを介して全CPUのBARRに反映される(図5の例ではビット[2]に反映)。その後、CPU#2は、「check r0-r3=1111」命令を実行するが、自身のBARRの値が「1010」であるため待機状態となる。同様に、CPU#0も、自身のBARRの値が「1010」であるため待機状態を保つ。
 続いて、所定の処理を完了したCPU#1が、その後の「inv rm」命令に伴い自身のBARW(初期値はゼロとする)を反転させて「1」にする。この情報は、前述した配線ブロックWBLKを介して全CPUのBARRに反映される(図5の例ではビット[1]に反映)。その後、CPU#1は、「check r0-r3=1111」命令を実行するが、自身のBARRの値が「1110」であるため待機状態となる。同様に、CPU#0及びCPU#2も、自身のBARRの値が「1110」であるため待機状態を保つ。
 最後に、所定の処理を完了したCPU#3が、その後の「inv rm」命令に伴い自身のBARW(初期値はゼロとする)を反転させて「1」にする。この情報は、前述した配線ブロックWBLKを介して全CPUのBARRに反映される(図5の例ではビット[3]に反映)。その後、CPU#3は、「check r0-r3=1111」命令を実行し、自身のBARRの値が「1111」であるため以降の処理へと進む。同様に、CPU#0、CPU#1、およびCPU#2も、自身のBARRの値が「1111」であるため以降の処理へと進む。これによってバリア同期処理が完了する。
 図6は、図2および図3のマルチプロセッサシステムにおいて、その動作の他の一例を示す説明図である。図6において、各CPU#0~#7は、所定の処理(S601)→バリア同期処理(S602)→所定の処理(S603)→バリア同期処理(S604)→所定の処理(S605)→バリア同期処理(S606)を行っている。各CPU#0~#7におけるバリアライトレジスタBARWおよびバリアリードレジスタBARRの初期値を「0」とすると、前述したように「inv rm」命令を用いてバリア同期処理を行うと、バリア同期処理(S602)ではBARRの8ビットが全て「1」の場合が同期ポイントとなる。そして、次のバリア同期処理(S604)では、BARRの8ビットが全て「0」の場合が同期ポイントとなり、更に次のバリア同期処理(S606)では、BARRの8ビットが全て「1」の場合が同期ポイントとなる。
 このように、「1」と「0」を反転させながら同期ポイントを設定することで、例えば、同期ポイントを「1」に固定するような場合と比べてバリア同期処理の高速化が図れる。すなわち、あるバリア同期処理を完了後にバリアライトレジスタBARWおよびバリアリードレジスタBARRを「0」にリセットする処理が不必要となる。
 以上のように、本実施の形態1のマルチプロセッサシステムは、各CPU内に、自身の同期待ちの情報を他のCPUに通知する第1レジスタ(BARW)と、他のCPUから通知されてきた第1レジスタの情報を保持する第2レジスタ(BARR)を設け、この第1レジスタの情報が直接的な配線(例えばメタル配線層など)によって第2レジスタに反映されるものとなっている。なお、直接的な配線とは、必ずしも配線のみで構成するのではなく、例えば、駆動能力を調整するためのバッファ回路やフリップフロップ回路等を介する場合など、実質的にそうであるものも含まれる。このような構成を用いると、代表的には、(1)時間的に高効率なバリア同期処理を実現可能になる、(2)低コストなハードウェアでバリア同期処理が実現可能になる、などの効果が得られる。
 (1)に関しては、図5に示したように、例えばCPU#0が同期待ちを通知するために第1レジスタ(BARW)に情報を書き込んだ場合、他のCPU#1~#3内の第2レジスタ(BARR)の情報が割り込み等のような間接的な方法ではなく、直接的な配線によって自動的に更新される。したがって、CPU#1~#3は、CPU#0から同期待ちの通知を受けても現在実行している処理を阻害されることはなく、高い処理効率を維持できる。また、最後に処理を完了したCPU#3が第1レジスタ(BARW)に情報を書き込みと、その情報が直接的な配線によって即座に各CPUの第2レジスタ(BARR)に反映されるため、CPU#3の処理完了から全CPUによるバリア同期処理の完了までに要する時間を短くできる。さらに、このようなバリア同期処理に伴い、各CPUは、自身内部に設けられた第1および第2レジスタをアクセスすればよいため、自身以外の場所へアクセスする場合と比べてアクセス時間も短くできる。そして、図6に示したように、反転動作を行いながら同期ポイントを設定することでも時間的な効率化が図れる。
 (2)に関しては、本実施の形態1のマルチプロセッサシステムは、各CPUの内部に第1レジスタ(BARW)および第2レジスタ(BARR)を設けて、この自身のレジスタ操作によってバリア同期処理が可能な構成となっている。したがって、自身以外の場所をアクセスするような特殊命令が不要となり、低コスト化が図れる。さらに、第1および第2レジスタをメモリマップドレジスタで実現することで、各CPUが一般的に備えているメモリアクセス命令を実行することでバリア同期処理が実現できるため、更なる低コスト化が図れる。
 一方、比較例として、前述した特許文献1のような技術を用いた場合、この同期待ちの通知がシステムバスを介して行われ、この通知が行われる度に他のCPUの同期待ち状況を示す同期レジスタをチェックする構成となっているため、各CPUは、この通知に伴い現在実行している処理が阻害されることになる。更に、システムバスのバス権の調停に時間を要することになる。また、比較例として、前述した特許文献2や非特許文献1のような技術を用いた場合は、各CPUに対して共通のフラグレジスタにアクセスを行うため、自身内部のレジスタにアクセスする場合と比べて時間を要する恐れがあり、更にその排他制御に時間を要する恐れもある。なお、非特許文献1の技術において、フラグレジスタの各ビットを独立して並行にライトできるように構成すればレジスタアクセスの排他制御は不必要となる。ただし、別の問題として、この技術のように、CPU外部に設けた共通のフラグレジスタに対してアクセスを行うような構成を用いると、各CPUの命令セットに特殊命令(バリア同期命令等)を実装する必要性が生じ、コストの増大が生じてしまう。
 (実施の形態2)
 図7は、本発明の実施の形態2によるマルチプロセッサシステムにおいて、その主要部の構成例を示す概略図である。前述した実施の形態1においては、バリアライトレジスタBARWとバリアリードレジスタBARRを別々のレジスタ(アドレスマップドレジスタの場合、個別にアドレスが割り当てられたレジスタ)とする構成例を示した。一方、図7に示すマルチプロセッサシステムは、前述した図3におけるバリアライトレジスタBARWとバリアリードレジスタBARRを統合して、共通のバリアレジスタBARとしたことが特徴となっている。図7において、複数(ここでは8個)のプロセッサCPU#0~#7のそれぞれは、8ビットのバリアレジスタBARを備えている。各バリアレジスタBARにおける同一ビット同士は、配線ブロックWBLK5による直接的な配線によって相互に接続される。すなわち、例えば、CPU#0~#7に含まれる8個のBARのビット[0]同士が相互に接続され、ビット[1]同士が相互に接続され、同様にビット[2]~ビット[7]のそれぞれも相互に接続される。
 各CPU#0~#7は、自身のバリアレジスタBARにおける自身に対応するビットのみにライトアクセスが可能となっており、また、BARの8ビットを対してリードアクセスが可能となっている。すなわち、例えば、CPU#0は、自身のBARのビット[0]のみにライトアクセスが可能となっており、同様に、CPU#1、#2、…、#7は、それぞれ、自身のBARのビット[1]、[2]、…、[7]のみにライトアクセスが可能となっている。したがって、各CPU#0~#7が、実施の形態1でバリアライトレジスタBARWをライトしたのと同様に、自身のBARにおける自身に対応するビットにライトを行うことで、実施の形態1の場合と同様にしてバリア同期処理を行うことが可能となる。
 以上、本実施の形態2のマルチプロセッサシステムを用いることで、実施の形態1で述べたような各種効果に加えて、レジスタ等の面積コストを削減可能になり、ハードウェアコストの更なる低減が可能になる。ただし、例えば、マスクライト機能や、リードモディファイライト機能や、または各ビット毎にアドレスを割り当てて管理する機能等によって自身のBARの特定1ビットのみにライトできるように構成する必要があるため、場合によっては、新たな制御回路が必要になったり、1ビットライト命令の処理時間が長くなることもある。
 (実施の形態3)
 図8は、本発明の実施の形態3によるマルチプロセッサシステムにおいて、その主要部の構成例を示す概略図である。図8に示すマルチプロセッサシステムは、複数のプロセッサCPUの一つ(ここではCPU#0)をマスタとし、このマスタが主体的となって他のCPUの同期待ちの状況を監視することで、前述した図3の場合と比べてバリアリードレジスタBARRのビット数が削減されたことが特徴となっている。
 図8において、マスタとなるCPU#0は、1ビットのバリアライトレジスタBARWと、7ビット(ここでは対応関係を判り易くするため、ビット[0]を省いてビット[1]~[7]とする)のバリアリードレジスタBARRを備える。一方、それ以外のCPU#1~#7は、1ビットのバリアライトレジスタBARWと、1ビットのバリアリードレジスタBARRを備える。配線ブロックWBLK6では、CPU#0における7ビットのBARRの各ビットと、CPU#1~#7に含まれる各BARWとか直接的な配線によってそれぞれ接続される。すなわち、例えば、CPU#0のBARRのビット[1]にCPU#1のBARWが接続され、同様に、ビット[2]、ビット[3]、…、ビット[7]に、それぞれ、CPU#2、CPU#3、…、CPU#7のBARWが接続される。また、WBLK6では、CPU#0のBARWが、CPU#1~#7にそれぞれ含まれる1ビットのBARRに直接的な配線によってブロードキャストで接続される。
 図9は、図8の構成例を用いた場合のバリア同期処理の動作例を示す説明図である。図9において、各CPU#0~#7は、所定の処理(スレッド)を実行した後(S901)、バリア同期処理を行う(S902)。バリア同期処理では、前述した図5および図6の場合と異なり、マスタとなるCPU#0と、それ以外のCPU#1~#7とでコードが異なっている。すなわち、簡単に説明すると、マスタとなるCPU#0が、他のCPU#1~#7の同期待ちを確認した後に自身のBARWに同期待ちをセットし、このCPU#0における同期待ちのセットを他のCPU#1~#7が自身のBARRで一斉に検出することでバリア同期処理が行われる。
 図10は、図9におけるバリア同期処理のより詳細な処理内容の一例を示す説明図である。ここでは、簡素化のため、4個のCPU#0~#3の場合を仮定して説明を行う。図10に示すように、マスタとなるCPU#0は、所定の処理(「do~enddo」に該当)を完了した後に、「check r1-r3=111」命令、次いで「inv r0」命令を実行する。一方、他のCPU#1~#3のそれぞれは、所定の処理(「do~enddo」に該当)を完了した後に、「inv rm」命令(mはCPU番号)、次いで「check r0=1」命令を実行する。
 図10の例では、まず、最初に所定の処理を完了したCPU#0が、その後の「check r1-r3=111」命令を実行するが、他のCPU#1~#3のBARWにまだ同期待ちフラグが設定されておらず、これに伴い自身のBARRの値が「000」(初期値はゼロとする)であるため待機状態となる。次いで、所定の処理を完了したCPU#2が、その後の「inv rm」命令に伴い自身のBARW(初期値はゼロとする)を反転させて「1」にする。この情報は、前述した配線ブロックWBLK6を介してCPU#0のBARRに反映される(図10の例ではビット[2]に反映)。その後、CPU#2は、「check r0=1」命令を実行するが、CPU#0がBARWにまだ同期待ちフラグを設定しておらず、これに伴い自身のBARRの値が「0」であるため待機状態となる。一方、CPU#0も、自身のBARRの値が「010」であるため待機状態を保つ。
 続いて、所定の処理を完了したCPU#1が、その後の「inv rm」命令に伴い自身のBARW(初期値はゼロとする)を反転させて「1」にする。この情報は、前述した配線ブロックWBLK6を介してCPU#0のBARRに反映される(図10の例ではビット[1]に反映)。その後、CPU#1は、「check r0=1」命令を実行するが、CPU#0がBARWにまだ同期待ちフラグを設定しておらず、これに伴い自身のBARRの値が「0」であるため待機状態となる。一方、CPU#0も、自身のBARRの値が「110」であるため待機状態を保つ。
 最後に、所定の処理を完了したCPU#3が、その後の「inv rm」命令に伴い自身のBARW(初期値はゼロとする)を反転させて「1」にする。この情報は、前述した配線ブロックWBLK6を介してCPU#0のBARRに反映される(図10の例ではビット[3]に反映)。その後、CPU#3は、「check r0=1」命令を実行するが、CPU#0がBARWにまだ同期待ちフラグを設定しておらず、これに伴い自身のBARRの値が「0」であるため待機状態となる。一方、CPU#0は、自身のBARRの値が「111」となったため、その後の「inv r0」命令に伴い自身のBARW(初期値はゼロとする)を反転させて「1」とし、以降の処理へと進む。また、これと並行してCPU#0のBARWの情報は、前述した配線ブロックWBLK6を介してCPU#1~#3のBARRに即座に反映される。これにより、待機状態であったCPU#1~#3は、自身のBARRが「1」となったため、以降の処理へと進む。このようにしてバリア同期処理が完了する。
 以上、本実施の形態3のマルチプロセッサシステムを用いることで、実施の形態1で述べたような各種効果に加えて、レジスタの面積コストを大幅に削減可能になり、ハードウェアコストの更なる低減が可能になる。なお、実施の形態1の場合と比べると、最後のCPUが処理を終えてから全てのCPUが同期を完了するまでの時間が若干延びる可能性はあるが、それでもなお十分な高速性を確保できる。
 (実施の形態4)
 図11は、本発明の実施の形態4によるマルチプロセッサシステムにおいて、その主要部の構成例を示す概略図である。図11に示すマルチプロセッサシステムは、図2の構成例と比較して、各プロセッサCPU#0~#7内にバリアライトレジスタBARWおよびバリアリードレジスタBARRを複数セット(ここでは3セット)備えたことが特徴となっている。
 図11のマルチプロセッサシステムは、図2の場合と同様に、CPU#0~#3からなるクラスタCLS0と、CPU#4~#7からなるクラスタCLS1とを含んでいる。各CPU#0~#7のそれぞれは、図2の場合と異なり、1ビット×3セットのバリアライトレジスタBARW[0]~[2]と、8ビット×3セットのバリアリードレジスタBARR[0]~[2]とを含んでいる。
 クラスタCLS0用の配線ブロックWBLK10は、CPU#0~#3に含まれる各BARW[0]からのセット[0]用の4ビット配線を、CPU#0~#3に含まれる各BARR[0]内の特定の4ビット(例えばビット[0]~[3])にそれぞれブロードキャストで接続すると共に配線ブロックWBLK11に向けて延伸させる。また、同様にして、CPU#0~#3に含まれる各BARW[1]からのセット[1]用の4ビット配線、及び各BARW[2]からのセット[2]用の4ビット配線を、それぞれ、CPU#0~#3に含まれる各BARR[1]内の例えばビット[0]~[3]、及び各BARR[2]内の例えばビット[0]~[3]にそれぞれ接続する。そして、WBLK10は、これらセット[1]用及びセット[2]用の4ビット配線を配線ブロックWBLK11に向けて延伸させる。
 クラスタCLS1用の配線ブロックWBLK11は、CPU#4~#7に含まれる各BARW[0]からのセット[0]用の4ビット配線を、CPU#4~#7に含まれる各BARR[0]内の特定の4ビット(例えばビット[4]~[7])にそれぞれブロードキャストで接続すると共に配線ブロックWBLK10に向けて延伸させる。また、同様にして、CPU#4~#7に含まれる各BARW[1]からのセット[1]用の4ビット配線、及び各BARW[2]からのセット[2]用の4ビット配線を、それぞれ、CPU#4~#7に含まれる各BARR[1]内の例えばビット[4]~[7]、及び各BARR[2]内の例えばビット[4]~[7]に接続する。そして、WBLK11は、これらセット[1]用およびセット[2]用の4ビット配線を配線ブロックWBLK10に向けて延伸させる。
 WBLK10は、WBLK11から延伸されてきたセット[0]用の4ビット配線をCPU#0~#3に含まれる各BARR[0]内の特定の4ビット(例えばビット[4]~[7])にそれぞれブロードキャストで接続する。同様にして、WBLK11から延伸されてきたセット[1]用の4ビット配線、及びセット[2]用の4ビット配線を、それぞれ、CPU#0~#3に含まれる各BARR[1]内の例えばビット[4]~[7]、及びCPU#0~#3に含まれる各BARR[2]内の例えばビット[4]~[7]に接続する。WBLK11は、WBLK10から延伸されてきたセット[0]用の4ビット配線をCPU#4~#7に含まれる各BARR[0]内の特定の4ビット(例えばビット[0]~[3])にそれぞれブロードキャストで接続する。同様にして、WBLK10から延伸されてきたセット[1]用の4ビット配線、及びセット[2]用の4ビット配線を、それぞれ、CPU#4~#7に含まれる各BARR[1]内の例えばビット[0]~[3]、及びCPU#4~#7に含まれる各BARR[2]内の例えばビット[0]~[3]に接続する。
 図12は、図11のマルチプロセッサシステムにおいて、その動作の一例を示す説明図である。図12の例は、例えばあるループ処理を8個のCPUで分担して実行する場合の動作例を示している。この場合、図12に示すように、コンパイラによって、例えば、8個のCPUで実行する第1階層のループ処理MT1の中に、4個のCPUで実行する第2階層のループ処理MT2_1,MT2_2が含まれ、更に、その中に2個のCPUで実行する第3階層のループ処理MT3_1~MT3_4が含まれるように各CPU毎の処理が割り当てられる。そうすると、各ループ階層毎に異なる資源を用いてバリア同期処理を行う必要がある。そこで、図11に示すように、この階層数に応じたセット数のバリアライトレジスタBARWおよびバリアリードレジスタBARRを設けることで、このようなループ処理を容易に実現可能となる。
 図12においては、CPU#0,#1が、それぞれ所定のループ処理(do~enddo)を行った後、自身のセット[0]用のバリアライトレジスタBARW[0]およびバリアリードレジスタBARR[0]を用いてバリア同期処理(BARRIER(0-1))を行う。同様に、CPU#2,#3は、所定のループ処理(do~enddo)を行った後、自身のBARW[0]およびBARR[0]を用いてバリア同期処理(BARRIER(0-2))を行い、CPU#4,#5およびCPU#6,#7も、同様にしてそれぞれバリア同期処理(BARRIER(0-3))およびバリア同期処理(BARRIER(0-4))を行う。
 このようにして2個のCPU間のバリア同期処理が完了した後は、4個のCPU間でバリア同期処理を行う。すなわち、CPU#0~#3は、自身のセット[1]用のバリアライトレジスタBARW[1]およびバリアリードレジスタBARR[1]を用いてバリア同期処理(BARRIER(1-1))を行う。同様に、CPU#4~#7は、自身のBARW[1]およびBARR[1]を用いてバリア同期処理(BARRIER(1-2))を行う。4個のCPU間のバリア同期処理が完了した後は、8個のCPU間でバリア同期処理を行う。すなわち、CPU#0~#7は、自身のセット[2]用のバリアライトレジスタBARW[2]およびバリアリードレジスタBARR[2]を用いてバリア同期処理(BARRIER(2))を行う。
 ここで、バリア同期処理(BARRIER(0-1))においては、CPU#0,#1が、まず、例えば、「inv rm[0]」命令によって、自身のBARW[0]の反転(初期値は‘0’)を行う。次いで、「check r0[0]-r1[0]=11」によって自身のBARR[0]の0ビット目(すなわちCPU#0のBARW[0])と1ビット目(すなわちCPU#1のBARW[0])が共に‘1’となるのを待つ。なお、図示はしないが、バリア同期処理(BARRIER(0-2))においては、同様に、CPU#2,#3が、「check r2[0]-r3[0]=11」によって自身のBARR[0]の2ビット目(すなわちCPU#2のBARW[0])と3ビット目(すなわちCPU#3のBARW[0])が共に‘1’となるのを待つことになる。
 また、バリア同期処理(BARRIER(1-1))においては、CPU#0~#3が、まず、例えば、「inv rm[1]」命令によって、自身のBARW[1]の反転(初期値は‘0’)を行う。次いで、「check r0[1]-r3[1]=1111」によって自身のBARR[1]の0ビット目(CPU#0のBARW[1])、1ビット目(CPU#1のBARW[1])、2ビット目(CPU#2のBARW[1])、および3ビット目(CPU#3のBARW[1])が共に‘1’となるのを待つ。さらに、バリア同期処理(BARRIER(2))においては、CPU#0~#7が、まず、例えば、「inv rm[2]」命令によって、自身のBARW[2]の反転(初期値は‘0’)を行う。次いで、「check r0[2]-r7[2]=11111111」によって自身のBARR[2]の0ビット目~7ビット目(CPU#0~#7のBARW[2]に対応)が共に‘1’となるのを待つ。
 このように、複数セットのバリアライトレジスタBARWおよびバリアリードレジスタBARRを設けることで、各CPUが、少ないCPU数で逐次同期(すなわちグルーピング)を行いながら最終的に全CPUで同期を行うような複数階層のバリア同期処理を含んだ処理内容(スレッド)を実行可能になる。なお、セット数としては、図12に示すように、コンパイラが全体を2分割しながらそれぞれに階層を割り当てていく場合、CPU数をiとして、(logi)セット以上設けることが望ましい。すなわちi=8の場合は3セット以上設けることが望ましい。ただし、2個のCPU間では、ソフトウェアを用いた同期も容易に実現可能であるため、場合によっては((logi)-1)セット以上でもよい。すなわち、場合によってはi=8に対して2セット以上であってもよい。
 図13は、図11のマルチプロセッサシステムにおいて、その動作の他の一例を示す説明図であり、図14は、図11のマルチプロセッサシステムにおいて、その動作の更に他の一例を示す説明図である。図13の例では、CPU#0とCPU#1が、セット[0]用のBARW[0]およびBARR[0]を用いてバリア同期処理(BARRIER(0-1))を行っている。その後、CPU#2とCPU#3が加わり、CPU#0~#3が、セット[1]用のBARW[1]およびBARR[1]を用いてバリア同期処理(BARRIER(1-1))を行っている。
 一方、CPU#0~#3の処理と並行して、CPU#4とCPU#5は、セット[1]用のBARW[1]およびBARR[1]を用いてバリア同期処理(BARRIER(1-2))を行っている。そして、最終的には、CPU#6,#7が加わり、CPU#0~#7が、セット[2]用のBARW[2]およびBARR[2]を用いてバリア同期処理(BARRIER(2))を行っている。
 図14の例では、CPU#0とCPU#1が、セット[0]用のBARW[0]およびBARR[0]を用いてバリア同期処理(BARRIER(0))を行った後、セット[1]用のBARW[1]およびBARR[1]を用いてバリア同期処理(BARRIER(1))を行っている。一方、これと並行して、CPU#2とCPU#3は、セット[0]用のBARW[0]およびBARR[0]を用いてバリア同期処理(BARRIER(0))を行った後、セット[1]用のBARW[1]およびBARR[1]を用いてバリア同期処理(BARRIER(1))を行っている。さらに、これと並行して、CPU#4~#7は、セット[1]用のBARW[1]およびBARR[1]を用いてバリア同期処理(BARRIER(1))を行っている。
 その後、CPU#0,#1は、セット[2]用のBARW[2]およびBARR[2]を用いてバリア同期処理(BARRIER(2))を行い、同様に、CPU#2~#4およびCPU#5~#7も、それぞれ、セット[2]用のBARW[2]およびBARR[2]を用いてバリア同期処理(BARRIER(2))を行っている。そして、最終的に、CPU#0~#7は、セット[0]用のBARW[0]およびBARR[0]を用いてバリア同期処理(BARRIER(0))を行っている。
 以上のように、各CPUがそれぞれ複雑なグルーピングを行いながら最終的なバリア同期処理を行う場合にも、各CPUが複数セットのバリアライトレジスタBARWおよびバリアリードレジスタBARRを備えることで容易に対応可能となる。なお、図11の例では、各CPUのバリアリードレジスタBARRをCPU数に該当する8ビット構成としたが、勿論、実施の形態3(図8~図10)で説明したようにマスタのCPUを定義してBARRのビット数を削減することも可能である。また、実施の形態2(図7)で説明したようにバリアライトレジスタBARWとバリアリードレジスタBARRを統合することも可能である。ここで、実施の形態3のようにマスタのCPUを定義した場合の構成例および動作例を以下に説明する。
 図15は、本発明の実施の形態4によるマルチプロセッサシステムにおいて、図12を変形した動作例を示す説明図である。ここでは、例えば、CPU数が4個で、4個のCPUで実行するループ処理MT1の中に2個のCPUで実行するループ処理MT2_1,MT2_2が含まれる場合を例として説明する。図15において、CPU#0とCPU#1は、所定のループ処理を行った後、バリア同期処理(BARRIER(B1))を行う。
 バリア同期処理(BARRIER(B1))では、CPU#1が自身のループ処理を終えた後に「inc r1[1]」命令によって自身のBARW[1]を+1増加する(言い換えればBARW[1]を反転する)。CPU#0は、マスタCPUであり、自身のループ処理を終えた後に、「check r1[1]」命令によってこのCPU#1のBARW[1]の反転有無を確認する。反転有りであった場合、CPU#0は、自身のBARW[1]を+1増加し(BARW[1]を反転し)、CPU#1は、「check r0[1]」命令によってこのCPU#0のBARW[1]の反転を検出する。これによってバリア同期処理(BARRIER(B1))が完了する。また、CPU#2およびCPU#3も、同様に、例えばCPU#2をマスタCPUとしてバリア同期処理(BARRIER(B2))を行う。
 次いで、CPU#0~#3でバリア同期処理(BARRIER(B3))を行う。バリア同期処理(BARRIER(B3))では、CPU#1が「inc r1[0]」命令によって自身のBARW[0]を+1増加する(BARW[0]を反転し)、同様に、CPU#2およびCPU#3も、それぞれ、「inc r2[0]」命令および「inc r3[0]」命令によって自身のBARW[0]を反転する。マスタCPUとなるCPU#0は、「check r1[0]」命令、「check r2[0]」命令、および「check r3[0]」命令によって、このCPU#1~#3のそれぞれによるBARW[0]の反転有無を確認する。全て反転有りであった場合、CPU#0は、自身のBARW[0]を+1増加し(BARW[0]を反転し)、CPU#1~#3は、「check r0[0]」命令によってこのCPU#0のBARW[0]の反転を検出する。これによって、バリア同期処理(BARRIER(B3))が完了する。
 したがって、このような4個のCPUの場合においては、例えば、CPU#0は、CPU#1~#3のBARWの値を読めればよく、CPU#1は、CPU#0のBARWの値を読めればよく、CPU#2は、CPU#3とCPU#0のBARWの値を読めればよく、CPU#3は、CPU#2とCPU#0のBARWの値を読めればよい。また、8個のCPUに拡張した場合は、例えば、CPU#0は、CPU#1~#7のBARWの値を読めればよく、CPU#1は、CPU#0のBARWの値を読めればよく、CPU#2は、CPU#3とCPU#0のBARWの値を読めればよく、CPU#3は、CPU#2とCPU#0のBARWの値を読めればよい。さらに、CPU#4は、CPU#5~#7とCPU#0のBARWの値を読めればよく、CPU#5は、CPU#4とCPU#0のBARWの値を読めればよく、CPU#6は、CPU#7とCPU#4とCPU#0のBARWの値を読めればよく、CPU#7は、CPU#6とCPU#4とCPU#0のBARWの値を読めればよい。したがって、これらに対応してBARRのビット数を削減することができる。
 以上、本実施の形態4のマルチプロセッサシステムを用いることで、これまでの実施の形態で述べたような各種効果に加えて、更に、複数階層のバリア同期処理を含んだ各CPUの処理内容(スレッド)にも容易に対応可能となる。特に、CPU数が増加するにつれてこのような複数階層のバリア同期処理が不可欠になると考えられ、その場合に本実施の形態4のマルチプロセッサシステムを用いることで有益な効果を得ることができる。
 (実施の形態5)
 図16は、本発明の実施の形態5によるマルチプロセッサシステムにおいて、その主要部の構成例を示す概略図である。図16に示すマルチプロセッサシステムは、実施の形態1で述べた図2の構成例と比較して、各CPU#0~#7内のバリアライトレジスタBARWのビット数をnビット(n≧2)とし、バリアリードレジスタBARRのビット数を(8×n)ビットとしたことが特徴となっている。すなわち、BARWに番号(バージョンナンバー)を設定できる構成例となっている。また、これに応じて、クラスタCLS0用の配線ブロックWBLK20からクラスタCLS1用の配線ブロックWBLK21に向かう配線本数およびWBLK21からWBLK20に向かう配線本数は、それぞれ((8×n)/2)本となる。更に、例えばWBLK20およびWBLK21内では、各CPU#0~#7内のBARWのnビットがBARR内の対応するnビットの箇所にブロードキャストで配線されるため、明示はしないが図2と比較して配線本数が増加している。それ以外の構成に関しては、図2の場合と同様であるため詳細な説明は省略する。
 図17は、図16のマルチプロセッサシステムにおいて、その動作の一例を示す説明図である。図17においては、実施の形態4で述べた図12の場合と同様に、各CPU#0~#7に対して第1階層のループ処理MT1、第2階層のループ処理MT2_1,MT2_2、第3階層のループ処理MT3_1~MT3_4からなる処理内容が割り当てられている。図12の例では、この3階層分の処理をそれぞれ異なるセットのBARWおよびBARRを用いることで実現したが、図17の例では、この3階層分の処理をBARWおよびBARR内のそれぞれ異なるビットを用いることで実現する。すなわち、図16において、n=3とし、BARWの各ビットを1階層に対応させる。
 図17において、CPU#0とCPU#1は、所定のループ処理を行った後にバリア同期処理(BARRIER(0-1))を行う。同様に、CPU#2と#3、CPU#4と#5、CPU#6と#7も、それぞれ、所定のループ処理を行った後にバリア同期処理(BARRIER(0-2))、(BARRIER(0-3))、(BARRIER(0-4))を行う。これら第3階層目のバリア同期処理は、BARWのnビット(3ビット)に“xx1(xは任意の値)”がセットされた場合を同期ポイントとして行う。
 すなわち、例えば、バリア同期処理(BARRIER(0-1))においては、CPU#0とCPU#1のそれぞれが、自身のループ処理を終えた後に、まず、「inv rm」命令によって自身のBARWにおける3ビット中の特定の1ビット(ここでは右端のビットとする)を反転させる。反転が行われると、各CPU#0~#7のBARRにおけるCPU#0とCPU#1に対応するレジスタフィールド(r0とr1に該当)のそれぞれの3ビット値は、配線ブロックWBLKを介して“xx1”となる。次いで、CPU#0とCPU#1のそれぞれは、「check r0-r1=all“xx1”」命令によって、BARRにおけるCPU#0とCPU#1に対応するレジスタフィールド(r0とr1に該当)の両方の3ビット値が、“xx1”となるまで待ち合わせを行う。そして、r0およびr1共に“xx1”となった段階でバリア同期処理(BARRIER(0-1))が完了する。
 このようにして第3階層目のバリア同期処理が行われた後は、第2階層目のバリア同期処理を行う。すなわち、CPU#0~#3がバリア同期処理(BARRIER(0-5))を行い、CPU#4~#7がバリア同期処理(BARRIER(0-6))を行う。これら第2階層目のバリア同期処理は、BARWのnビット(3ビット)に“x1x”がセットされた場合を同期ポイントとして行う。
 例えば、バリア同期処理(BARRIER(0-5))においては、CPU#0~#3のそれぞれが、まず、「inv rm」命令によって自身のBARWにおける3ビット中の特定の1ビット(ここでは真ん中のビットとする)を反転させる。この第2階層目に伴う反転が行われると、各CPU#0~#7のBARRにおけるCPU#0~#3に対応するレジスタフィールド(r0~r3に該当)のそれぞれの3ビット値は、“x1x”となる。次いで、CPU#0~#3のそれぞれは、「check r0-r3=all“x1x”」命令によって、BARRにおけるCPU#0~#3に対応するレジスタフィールド(r0~r3に該当)のそれぞれの3ビット値が、全て“x1x”となるまで待ち合わせを行う。そして、r0~r3の全てが“x1x”となった段階でバリア同期処理(BARRIER(0-5))が完了する。
 このようにして第2階層目のバリア同期処理が行われた後は、第1階層目のバリア同期処理を行う。すなわち、CPU#0~#7がバリア同期処理(BARRIER(0-7))を行う。この第1階層目のバリア同期処理は、BARWのnビット(3ビット)に“1xx”がセットされた場合を同期ポイントとして行う。
 バリア同期処理(BARRIER(0-7))においては、CPU#0~#7のそれぞれが、まず、「inv rm」命令によって自身のBARWにおける3ビット中の特定の1ビット(ここでは左端のビットとする)を反転させる。この第1階層目に伴う反転が行われると、各CPU#0~#7のBARRにおけるCPU#0~#7に対応するレジスタフィールド(r0~r7に該当)のそれぞれの3ビット値は、“1xx”となる。次いで、CPU#0~#7のそれぞれは、「check r0-r7=all“1xx”」命令によって、BARRにおけるCPU#0~#7に対応するレジスタフィールド(r0~r7に該当)のそれぞれの3ビット値が、全て“1xx”となるまで待ち合わせを行う。そして、r0~r7の全てが“1xx”となった段階でバリア同期処理(BARRIER(0-7))が完了する。
 なお、図示はしないが、その後の処理で、例えば、BARWの3ビット中の右端のビットを再び用いてバリア同期処理を行う場合には、前述した第3階層目のバリア同期処理によってBARWの当該ビットが既に‘1’となっているため、今度はBARWの3ビットに“xx0(xは任意の値)”がセットされた場合を同期ポイントとする。これによって、実施の形態1で述べたように、反転したビットを元に戻すようなリセット動作を省略でき、高速化が図れる。
 図18は、図16のマルチプロセッサシステムにおいて、その動作の他の一例を示す説明図である。図18は、実施の形態3で述べたようにマスタCPUを定義した場合での動作例を示している。ここでは、CPU数が4個の場合を例として説明を行う。図18においては、CPU#0~#3で実行する第1階層のループ処理MT1の中に、CPU#0,#1で実行する第2階層のループ処理MT2_1と、CPU#2,#3で実行する第2階層のループ処理MT2_2が含まれている。また、レジスタフィールドは、CPU数が4個の場合、r0~r3であり、r0~r3のそれぞれの中に2ビット(log4)が含まれることになる。
 CPU#0,#1は、所定のループ処理を終えた後に第2階層目のバリア同期処理(BARRIER(B1))を行う。バリア同期処理(BARRIER(B1))では、まず、CPU#1が、所定のループ処理を終えた後に「inv r1(1)」命令によって自身のBARWにおける2ビット中の一方のビットを反転させる。CPU#0は、マスタCPUであり、所定のループ処理を終えた後に「check r1(1)」命令によって前述したCPU#1によるBARWのビット反転の有無を確認する。ビット反転が有りの場合、CPU#0は「inv r0(1)」命令によって自身のBARWにおける2ビット中の一方のビットを反転させる。そして、CPU#1が、「check r0(1)」命令によって、このCPU#0によるBARWのビット反転動作を検出した段階でバリア同期処理(BARRIER(B1))が完了する。また、CPU#2,#3も同様にして第2階層目のバリア同期処理(BARRIER(B2))を行う。
 第2階層目のバリア同期処理が完了すると、CPU#0~#3は、第1階層目のバリア同期処理(BARRIER(B3))を行う。バリア同期処理(BARRIER(B3))では、CPU#1が「inv r1(0)」命令によって自身のBARWにおける2ビット中の他方のビットを反転し、同様に、CPU#2およびCPU#3も、それぞれ、「inv r2(0)」命令および「inv r3(0)」命令によって自身のBARWにおける2ビット中の他方のビットを反転する。マスタCPUとなるCPU#0は、「check r1(0)」命令、「check r2(0)」命令、および「check r3(0)」命令によって、このCPU#1~#3のそれぞれがBARWにおける2ビット中の他方のビットを反転したかを確認する。全て反転有りであった場合、CPU#0は、自身のBARWにおける2ビット中の他方のビットを反転し、CPU#1~#3は、「check r0(0)」命令によってこのCPU#0によるBARWのビット反転動作を検出する。これによって、バリア同期処理(BARRIER(B3))が完了する。
 図19は、図18の動作例において、そのバリア同期処理(BARRIER(B1))で用いる詳細なソースコードの一例を示す説明図である。図19において、CPU#1は変数「ver」と「1」とのEXOR演算を行い、その結果として得られた「ver」の値を変数「r1」に代入している。すなわち「ver」の値が“00”であった場合、EXOR演算を介して「r1」に“01”が代入され、逆に、「ver」の値が“01”であった場合、EXOR演算を介して「r1」に“00”が代入される。これは、図18における「inv r1(1)」命令に該当する。
 一方、CPU#0も変数「ver」と「1」とのEXOR演算を行い、その結果を「ver」に代入している。そして、CPU#0は、「while」文によって、このEXOR演算結果となる「ver」の値とCPU#1で得られた「r1」の値とが一致するまで待機する。すなわち、例えば、CPU#0の演算によって得られた「ver」=“01”の値を期待値として、CPU#1が「r1」に“01”を設定するのを待つ。これは、図18における「check r1(1)」命令に該当する。CPU#1が「r1」に“01”を設定すると、CPU#0は「while」文を抜け、変数「r0」に「ver」の値を設定する。すなわち、例えば「r0」に“01”を設定する。一方、CPU#1は、「while」文を用いて「r0」に“01”が設定されるのを待っており、この設定動作を検出することでバリア同期処理が完了となる。
 以上、本実施の形態5のマルチプロセッサシステムを用いることで、これまでの実施の形態で述べたような各種効果に加えて、更に、複数階層のバリア同期処理を含んだ各CPUの処理内容(スレッド)にも容易に対応可能となる。特に、CPU数が増加するにつれてこのような複数階層のバリア同期処理が不可欠になると考えられ、その場合に本実施の形態5のマルチプロセッサシステムを用いることで有益な効果を得ることができる。なお、図16では、バリアライトレジスタBARWとバリアリードレジスタBARRを別々のレジスタとしたが、勿論、実施の形態2の図7に示したように、統合した一つのレジスタBARとすることも可能である。
 (実施の形態6)
 図20は、本発明の実施の形態6によるマルチプロセッサシステムにおいて、図16の構成例を用いた他の動作の一例を示す説明図である。ここでは、図16におけるバリアライトレジスタBARW等のnビット(すなわちバージョンナンバー)を、実施の形態5で述べたような階層の切り分け用途以外で利用する場合の動作例が示されている。
 図20において、各CPU#0~#7は、所定の処理を行った後(S2001)、同期ポイントを‘1’としてバリア同期処理(BARRIER(0-1))を行う。次いで、所定の処理を行った後(S2002)、今度は同期ポイントを‘2’としてバリア同期処理(BARRIER(0-2))を行う。その後、所定の処理を行った後(S2003)、今度は同期ポイントを‘3’としてバリア同期処理(BARRIER(0-3))を行う。これによって、例えばバリア同期処理を行う回数などを管理することができる。
 例えば、バリア同期処理(BARRIER(0-3))では、各CPU#0~#7が「inc rm」命令によって自身のBARWの値に+1を加え、その後、「check r0-r7=all‘3’」命令によって、各CPU#0~#7のBARWの値が全て‘3’となるのを待つ。図16において、例えばBARW等のnビットが2ビットの場合には、‘0’~‘3’までのバージョンナンバーを使用できる。この場合、図20における‘3’の次はまた‘0’に戻ってバリア同期処理を行うことになる。このような動作を用いると、実施の形態1で述べたように、バージョンナンバーをリセットするような動作は行わないため、高速化が図れる。
 また、このようなバージョンナンバーを用いることで、複雑なバリア同期処理に柔軟に対応することが可能となる。例えば、バージョンナンバーを直値で指定することで、あるCPUと他のCPUをバージョンナンバー‘1’で同期させ、あるCPUと更に他のCPUをバージョンナンバー‘2’で同期させることなどが可能となる。この場合、バージョンナンバーで同期を管理することで、1ビットの情報しかない場合と比べて容易に同期処理を行うことが可能となる。
 (実施の形態7)
 図21は、本発明の実施の形態7によるマルチプロセッサシステムにおいて、その主要部の構成例を示す概略図である。図21に示すマルチプロセッサシステムは、実施の形態4で述べた図11の構成例と比較して、CPU#0~#7内のバリアライトレジスタBARW[0],[1],[2]のそれぞれのビット数をnビット(n≧2)とし、バリアリードレジスタBARR[0],[1],[2]のそれぞれのビット数を(8×n)ビットとしたことが特徴となっている。すなわち、実施の形態4で述べたように、BARWおよびBARRを複数セット設ける構成に加えて、さらに各セット内で、実施の形態5,6で述べたようなバージョンナンバーも設定できる構成例となっている。
 このような構成を用いると、実施の形態4で述べたように各セットの数に応じて複数階層に対応でき、更に実施の形態5で述べたようにバージョンナンバーのビット数に応じて複数階層に対応できるため、その組合せにより例えば3階層を超えたような場合にも対応可能となる。すなわち、例えば、図12に対して、CPU#0とCPU#2からなる第4階層のループ処理が加わったような場合にも対応可能となる。
 図22は、図21のマルチプロセッサシステムにおいて、その使用例を示す説明図である。ここでは、CPU数が4個の場合を例として説明を行う。図22においては、CPU#0~#3によって実行される第1階層のループ処理MT1の中に、CPU#0と#1によって実行される第2階層のループ処理MT2_1と、CPU#2と#3によって実行される第2階層のループ処理MT2_2とが含まれている。CPU#0,#1は、所定のループ処理を終えた後に第2階層目のバリア同期処理(BARRIER(B1))を行い、CPU#2,#3も、所定のループ処理を終えた後に第2階層目のバリア同期処理(BARRIER(B2))を行う。そして、第2階層目のバリア同期処理を終えた後、CPU#0~#3は、第1階層目のバリア同期処理(BARRIER(B3))を行う。
 このようにCPU数が4個の場合、2階層に対応して例えばBARWおよびBARRのセットを2セット設ける。そして、各セットにおいては、各CPUに含まれるBARW等にnビット(n≧2)のバージョンナンバーが設定可能な構成となっている。この場合、図22に示すように、各階層のループ処理MT,MT2_1,MT2_2に対して、各ループ処理の回転数をバージョンナンバーを用いて管理することができる。例えば、バリア同期処理(BARRIER(B1))を2回行った(すなわちループ処理MT2_1を2回転した)段階でMT2_1を抜け、ループ処理MT2_2を3回転した段階でMT2_2を抜け、ループ処理MT1を4回転した段階でMT1を抜けるような動作を行うことが可能となる。
 また、各ループ処理を回転する毎にバージョンナンバーを更新していくことで、例えば、このバージョンナンバーをプログラムデバッグ時のブレークポイントの停止条件として使用することもできる。更には、ホットスポットの動的抽出等を行う際に活用することなども可能となる。なお、例えば、バージョンナンバーを用いずに、その分セット数を増やしたり、逆にセット数を1セットとして、その分バージョンナンバーのビット数を増やすことなどでも、より高度なバリア同期処理に対応可能となる。ただし、この場合、プログラムの可読性の低下などを招く恐れがあり、この観点から、セットとバージョンナンバーを併用した構成とする方が望ましい。
 以上、本実施の形態7のマルチプロセッサシステムを用いることで、これまでの実施の形態で述べたような各種効果に加えて、更に、より複雑又は高度なバリア同期処理を行いたい場合にも柔軟に対応することが可能となる。特に、CPU数が増加するにつれて、より高度なバリア同期処理が必要になると考えられ、その場合に本実施の形態7のマルチプロセッサシステムを用いることで有益な効果を得ることができる。
 以上、本発明者よりなされた発明を実施の形態に基づき具体的に説明したが、本発明は前記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることは言うまでもない。
 本発明の一実施の形態によるマルチプロセッサシステムは、特に、組み込み用途向けのシステムなどのようにハードウェアコストや開発期間の制約が大きい分野向けのシステムに適用して有益な技術であり、これに限らず、マルチプロセッサシステム全般に対して広く適用可能である。

Claims (23)

  1.  N(N≧2)個のプロセッサと、
     前記N個のプロセッサ内にそれぞれ設けられたN個のバリアライトレジスタと、
     前記N個のプロセッサ内にそれぞれ設けられたN個のバリアリードレジスタと、
     前記N個のバリアライトレジスタを前記N個のバリアリードレジスタに配線する配線ブロックとを有し、
     前記配線ブロックは、前記N個のプロセッサ内のいずれかのプロセッサがバリア同期に伴い自身に設けられたバリアライトレジスタに第1情報を書き込んだ際に、前記第1情報を他のプロセッサに設けられたバリアリードレジスタに直接的な配線を用いて伝送し、
     前記他のプロセッサは、自身に設けられたバリアリードレジスタを介して前記第1情報を検出可能となっていることを特徴とするマルチプロセッサシステム。
  2.  請求項1記載のマルチプロセッサシステムにおいて、
     前記N個のバリアライトレジスタのそれぞれは、1ビットレジスタであることを特徴とするマルチプロセッサシステム。
  3.  請求項2記載のマルチプロセッサシステムにおいて、
     前記N個のバリアリードレジスタのそれぞれは、Nビットレジスタであり、
     前記配線ブロックは、前記N個のバリアライトレジスタのいずれかを前記N個のバリアリードレジスタが備えるNビット中の特定の1ビットにブロードキャスト配線し、前記N個のバリアライトレジスタの他のいずれかを前記N個のバリアリードレジスタが備えるNビット中の他の特定の1ビットにブロードキャスト配線することを特徴とするマルチプロセッサシステム。
  4.  請求項3記載のマルチプロセッサシステムにおいて、
     前記N個のプロセッサのそれぞれに設けられたバリアライトレジスタは、これと同一のプロセッサに設けられたバリアリードレジスタが備えるNビット中の1ビットを併用することで実現されることを特徴とするマルチプロセッサシステム。
  5.  請求項2記載のマルチプロセッサシステムにおいて、
     前記N個のバリアリードレジスタの内、前記N個のプロセッサのいずれか一つとなる第1プロセッサに含まれる第1バリアリードレジスタは、(N-1)ビット以上のレジスタであり、
     前記N個のバリアリードレジスタの内、前記第1バリアリードレジスタ以外の(N-1)個のバリアリードレジスタは、1ビットレジスタであり、
     前記配線ブロックは、前記第1プロセッサ以外に含まれる(N-1)個のバリアライトレジスタを前記第1バリアリードレジスタの前記(N-1)ビットに1対1で配線し、前記第1プロセッサに含まれるバリアライトレジスタを前記第1バリアリードレジスタ以外の(N-1)個のバリアリードレジスタにブロードキャスト配線することを特徴とするマルチプロセッサシステム。
  6.  請求項1記載のマルチプロセッサシステムにおいて、さらに、
     前記N個のプロセッサに共通に接続されたシステムバスと、
     前記システムバスに接続され、前記N個のプロセッサで共通にアクセスされるメモリとを有することを特徴とするマルチプロセッサシステム。
  7.  請求項1記載のマルチプロセッサシステムにおいて、
     前記N個のバリアライトレジスタおよび前記N個のバリアリードレジスタのそれぞれは、アドレスマップドレジスタであることを特徴とするマルチプロセッサシステム。
  8.  請求項1記載のマルチプロセッサシステムにおいて、
     前記N個のプロセッサは、複数のクラスタに分割され、
     前記配線ブロックは、前記複数のクラスタにそれぞれ対応して複数設けられ、
     前記複数の配線ブロックのそれぞれは、自身のクラスタに含まれるバリアライトレジスタを自身のクラスタに含まれるバリアリードレジスタに配線し、前記自身のクラスタに含まれるバリアライトレジスタからの配線を自身以外のクラスタに延伸し、前記自身以外のクラスタから延伸されてきた前記自身以外のクラスタに含まれるバリアライトレジスタからの配線を前記自身のクラスタに含まれるバリアリードレジスタに配線することを特徴とするマルチプロセッサシステム。
  9.  N(N≧2)個のプロセッサと、
     前記N個のプロセッサ内にそれぞれM(M≧2)セットずつ設けられた(M×N)個のバリアライトレジスタと、
     前記N個のプロセッサ内にそれぞれMセットずつ設けられた(M×N)個のバリアリードレジスタと、
     前記(M×N)個のバリアライトレジスタを前記(M×N)個のバリアリードレジスタに配線する配線ブロックとを有し、
     前記配線ブロックは、前記N個のプロセッサ内のいずれかのプロセッサがバリア同期に伴い自身に設けられた第K(K≦M)セット目のバリアライトレジスタに第1情報を書き込んだ際に、前記第1情報を他のプロセッサに設けられた第Kセット目のバリアリードレジスタに直接的な配線を用いて伝送し、
     前記他のプロセッサは、自身に設けられた前記第Kセット目のバリアリードレジスタを介して前記第1情報を検出可能となっていることを特徴とするマルチプロセッサシステム。
  10.  請求項9記載のマルチプロセッサシステムにおいて、
     前記(M×N)個のバリアライトレジスタのそれぞれは、1ビットレジスタであることを特徴とするマルチプロセッサシステム。
  11.  請求項10記載のマルチプロセッサシステムにおいて、
     前記(M×N)個のバリアリードレジスタのそれぞれは、Nビットレジスタであり、
     前記配線ブロックは、前記N個のプロセッサのいずれかとなる第1プロセッサに設けられた前記第Kセット目のバリアライトレジスタを前記第1プロセッサ以外のプロセッサに設けられた前記第Kセット目のバリアリードレジスタが備えるNビット中の特定の1ビットにブロードキャスト配線し、前記N個のプロセッサの他のいずれかとなる第2プロセッサに設けられた前記第Kセット目のバリアライトレジスタを前記第2プロセッサ以外のプロセッサに設けられた前記第Kセット目のバリアリードレジスタが備えるNビット中の他の特定の1ビットにブロードキャスト配線することを特徴とするマルチプロセッサシステム。
  12.  請求項11記載のマルチプロセッサシステムにおいて、
     前記N個のプロセッサのそれぞれに設けられた前記第Kセット目のバリアライトレジスタは、これと同一のプロセッサに設けられた前記第Kセット目のバリアリードレジスタが備えるNビット中の1ビットを併用することで実現されることを特徴とするマルチプロセッサシステム。
  13.  請求項9記載のマルチプロセッサシステムにおいて、さらに、
     前記N個のプロセッサに共通に接続されたシステムバスと、
     前記システムバスに接続され、前記N個のプロセッサで共通にアクセスされるメモリとを有することを特徴とするマルチプロセッサシステム。
  14.  請求項9記載のマルチプロセッサシステムにおいて、
     前記(M×N)個のバリアライトレジスタおよび前記(M×N)個のバリアリードレジスタのそれぞれは、アドレスマップドレジスタであることを特徴とするマルチプロセッサシステム。
  15.  請求項9記載のマルチプロセッサシステムにおいて、
     前記N個のプロセッサは、複数のクラスタに分割され、
     前記配線ブロックは、前記複数のクラスタにそれぞれ対応して複数設けられ、
     前記複数の配線ブロックのそれぞれは、自身のクラスタに含まれるバリアライトレジスタを自身のクラスタに含まれるバリアリードレジスタに配線し、前記自身のクラスタに含まれるバリアライトレジスタからの配線を自身以外のクラスタに延伸し、前記自身以外のクラスタから延伸されてきた前記自身以外のクラスタに含まれるバリアライトレジスタからの配線を前記自身のクラスタに含まれるバリアリードレジスタに配線することを特徴とするマルチプロセッサシステム。
  16.  N(N≧2)個のプロセッサと、
     前記N個のプロセッサ内にそれぞれM(M≧2)セットずつ設けられた(M×N)個のバリアライトレジスタと、
     前記N個のプロセッサ内にそれぞれMセットずつ設けられた(M×N)個のバリアリードレジスタと、
     前記N個のプロセッサ内のいずれかのプロセッサがバリア同期に伴い自身に設けられた第K(K≦M)セット目のバリアライトレジスタに第1情報を書き込んだ際に、前記第1情報を他のプロセッサに設けられた第Kセット目のバリアリードレジスタに伝送する第1手段とを備え、
     前記他のプロセッサは、自身に設けられた前記第Kセット目のバリアリードレジスタを介して前記第1情報を検出可能となっていることを特徴とするマルチプロセッサシステム。
  17.  請求項16記載のマルチプロセッサシステムにおいて、
     前記第1手段は、前記(M×N)個のバリアライトレジスタを前記(M×N)個のバリアリードレジスタに直接的に配線することで実現されることを特徴とするマルチプロセッサシステム。
  18.  請求項16記載のマルチプロセッサシステムにおいて、
     前記(M×N)個のバリアライトレジスタのそれぞれは、1ビットレジスタであることを特徴とするマルチプロセッサシステム。
  19.  請求項16記載のマルチプロセッサシステムにおいて、
     前記(M×N)個のバリアライトレジスタのそれぞれは、複数ビットレジスタであることを特徴とするマルチプロセッサシステム。
  20.  N(N≧2)個のプロセッサと、
     前記N個のプロセッサ内にそれぞれ設けられたN個のバリアライトレジスタと、
     前記N個のプロセッサ内にそれぞれ設けられたN個のバリアリードレジスタと、
     前記N個のプロセッサ内のいずれかのプロセッサがバリア同期に伴い自身に設けられたバリアライトレジスタに第1情報を書き込んだ際に、前記第1情報を他のプロセッサに設けられたバリアリードレジスタに伝送する第1手段とを備え、
     前記N個のバリアライトレジスタのそれぞれは、複数ビットレジスタであり、
     前記第1情報には、前記複数ビットレジスタのビット数に応じて複数種類が設定でき、
     前記他のプロセッサは、自身に設けられた前記バリアリードレジスタを介して前記第1情報を検出可能となっていることを特徴とするマルチプロセッサシステム。
  21.  請求項20記載のマルチプロセッサシステムにおいて、
     前記第1手段は、前記N個のバリアライトレジスタを前記N個のバリアリードレジスタに直接的に配線することで実現されることを特徴とするマルチプロセッサシステム。
  22.  N(N≧2)個のプロセッサと、
     前記N個のプロセッサ内にそれぞれ設けられたN個のバリアライトレジスタと、
     前記N個のプロセッサ内にそれぞれ設けられたN個のバリアリードレジスタと、
     前記N個のプロセッサ内のいずれかのプロセッサがバリア同期に伴い自身に設けられたバリアライトレジスタに第1情報を書き込んだ際に、前記第1情報を他のプロセッサに設けられたバリアリードレジスタに伝送する第1手段とを用い、
     前記N個のプロセッサが、自身に設けられたバリアリードレジスタを読み、第1の値を同期ポイントとして自身以外のプロセッサの同期待ち状態を判別することで前記N個のプロセッサのバリア同期処理を行う第1処理と、
     前記第1処理の後に、前記N個のプロセッサが、自身のバリアライトレジスタの値を反転またはインクリメントすることで自身のバリアライトレジスタに第2の値を設定する第2処理と、
     前記第2処理の後に、前記N個のプロセッサが、自身に設けられたバリアリードレジスタを読み、前記第2の値を同期ポイントとして自身以外のプロセッサの同期待ち状態を判別することで前記N個のプロセッサのバリア同期処理を行う第3処理とを実行することを特徴とするマルチプロセッサシステムの同期方法。
  23.  1個のマスタプロセッサを含んだN(N≧2)個のプロセッサと、
     前記N個のプロセッサ内にそれぞれ設けられたN個のバリアライトレジスタと、
     前記N個のプロセッサ内にそれぞれ設けられたN個のバリアリードレジスタと、
     前記N個のプロセッサ内のいずれかのプロセッサがバリア同期に伴い自身に設けられたバリアライトレジスタに第1情報を書き込んだ際に、前記第1情報を他のプロセッサに設けられたバリアリードレジスタに伝送する第1手段とを用い、
     前記マスタプロセッサ以外のプロセッサ全てが自身のバリアライトレジスタに前記第1情報を書き込んだことを、前記マスタプロセッサが、自身のバリアリードレジスタを介して検出する第1処理と、
     前記第1処理の後に、前記マスタプロセッサが自身のバリアライトレジスタに前記第1情報を書き込む第2処理と、
     前記第2処理と並行して、前記マスタプロセッサが自身のバリアライトレジスタに前記第1情報を書き込んだことを、前記マスタプロセッサ以外のプロセッサ全てが、自身のバリアリードレジスタを介して検出する第3処理とを実行することを特徴とするマルチプロセッサシステムの同期方法。
PCT/JP2009/051051 2008-01-25 2009-01-23 マルチプロセッサシステムおよびマルチプロセッサシステムの同期方法 WO2009093680A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200980103004.XA CN101925881B (zh) 2008-01-25 2009-01-23 多处理器系统以及多处理器系统的同步方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008-015028 2008-01-25
JP2008015028A JP2009176116A (ja) 2008-01-25 2008-01-25 マルチプロセッサシステムおよびマルチプロセッサシステムの同期方法

Publications (1)

Publication Number Publication Date
WO2009093680A1 true WO2009093680A1 (ja) 2009-07-30

Family

ID=40900412

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/051051 WO2009093680A1 (ja) 2008-01-25 2009-01-23 マルチプロセッサシステムおよびマルチプロセッサシステムの同期方法

Country Status (4)

Country Link
US (1) US8108660B2 (ja)
JP (1) JP2009176116A (ja)
CN (1) CN101925881B (ja)
WO (1) WO2009093680A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012128808A (ja) * 2010-12-17 2012-07-05 Fujitsu Ltd 並列計算機システム、同期装置、並列計算機システムの制御方法
JP2013025698A (ja) * 2011-07-25 2013-02-04 Nec System Technologies Ltd モジュール、周波数制御方法、及び周波数制御プログラム
JP2015185129A (ja) * 2014-03-26 2015-10-22 三菱電機株式会社 データ処理装置

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8904118B2 (en) 2011-01-07 2014-12-02 International Business Machines Corporation Mechanisms for efficient intra-die/intra-chip collective messaging
US20120179896A1 (en) 2011-01-10 2012-07-12 International Business Machines Corporation Method and apparatus for a hierarchical synchronization barrier in a multi-node system
US9195550B2 (en) 2011-02-03 2015-11-24 International Business Machines Corporation Method for guaranteeing program correctness using fine-grained hardware speculative execution
US8607247B2 (en) * 2011-11-03 2013-12-10 Advanced Micro Devices, Inc. Method and system for workitem synchronization
US9846673B2 (en) * 2011-11-04 2017-12-19 Waseda University Processor, accelerator, and direct memory access controller within a processor core that each reads/writes a local synchronization flag area for parallel execution
US9092272B2 (en) * 2011-12-08 2015-07-28 International Business Machines Corporation Preparing parallel tasks to use a synchronization register
CN102651044B (zh) * 2012-03-31 2014-03-19 北京经纬恒润科技有限公司 一种仿真节点、多余度仿真计算机系统及方法
JP6074932B2 (ja) * 2012-07-19 2017-02-08 富士通株式会社 演算処理装置及び演算処理方法
US20140282564A1 (en) * 2013-03-15 2014-09-18 Eli Almog Thread-suspending execution barrier
JP6152786B2 (ja) * 2013-11-29 2017-06-28 富士通株式会社 通信制御装置、情報処理装置、並列計算機システム、制御プログラム、及び並列計算機システムの制御方法
CN104932947B (zh) * 2014-03-17 2018-06-05 华为技术有限公司 一种栅栏同步方法及设备
JP6176166B2 (ja) 2014-03-25 2017-08-09 株式会社デンソー データ処理装置
JP6519343B2 (ja) * 2015-06-24 2019-05-29 株式会社デンソー データ処理装置
US10223436B2 (en) * 2016-04-27 2019-03-05 Qualcomm Incorporated Inter-subgroup data sharing
US10318355B2 (en) * 2017-01-24 2019-06-11 Oracle International Corporation Distributed graph processing system featuring interactive remote control mechanism including task cancellation
US10896106B2 (en) * 2018-05-10 2021-01-19 Teradyne, Inc. Bus synchronization system that aggregates status
US11449339B2 (en) * 2019-09-27 2022-09-20 Red Hat, Inc. Memory barrier elision for multi-threaded workloads
US11461130B2 (en) 2020-05-26 2022-10-04 Oracle International Corporation Methodology for fast and seamless task cancelation and error handling in distributed processing of large graph data

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07262142A (ja) * 1994-03-18 1995-10-13 Fujitsu Ltd 並列処理制御方式
JPH10111857A (ja) * 1996-10-07 1998-04-28 Nec Corp マルチプロセッサ

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02105961A (ja) 1988-10-14 1990-04-18 Nippon Telegr & Teleph Corp <Ntt> マルチプロセッサ同期方式
US5127092A (en) * 1989-06-15 1992-06-30 North American Philips Corp. Apparatus and method for collective branching in a multiple instruction stream multiprocessor where any of the parallel processors is scheduled to evaluate the branching condition
JP2559918B2 (ja) * 1990-06-14 1996-12-04 富士通株式会社 並列計算機における同期制御方式
JP2622219B2 (ja) * 1991-12-26 1997-06-18 富士通株式会社 並列計算機の性能評価方法及びその装置
US5434995A (en) * 1993-12-10 1995-07-18 Cray Research, Inc. Barrier synchronization for distributed memory massively parallel processing systems
JP2880399B2 (ja) * 1994-03-24 1999-04-05 株式会社日立製作所 並列計算機
DE19536518C2 (de) * 1995-09-29 1998-07-09 Siemens Ag Verfahren zur Aufrechterhaltung des mikrosynchronen Betriebs von gedoppelten informationsverarbeitenden Einheiten
US5768538A (en) * 1996-04-30 1998-06-16 International Business Machines Corporation Barrier synchronization method wherein members dynamic voting controls the number of synchronization phases of protocols and progression to each new phase
JP2962241B2 (ja) 1996-09-10 1999-10-12 日本電気株式会社 階層型マルチプロセッサにおける並列処理方法
JPH1131133A (ja) * 1997-07-11 1999-02-02 Yaskawa Electric Corp モジュール間の同期方法
JP3636871B2 (ja) * 1997-09-16 2005-04-06 株式会社日立製作所 並列プロセッサシステム
US6216174B1 (en) * 1998-09-29 2001-04-10 Silicon Graphics, Inc. System and method for fast barrier synchronization
JP3858492B2 (ja) * 1998-12-28 2006-12-13 株式会社日立製作所 マルチプロセッサシステム
JP2000305919A (ja) 1999-04-23 2000-11-02 Hitachi Ltd マルチプロセッサシステムとその同期方法、振動試験装置
JP4276028B2 (ja) 2003-08-25 2009-06-10 株式会社日立製作所 マルチプロセッサシステムの同期方法
US20050055594A1 (en) * 2003-09-05 2005-03-10 Doering Andreas C. Method and device for synchronizing a processor and a coprocessor
US20080022142A1 (en) * 2004-10-27 2008-01-24 Shinichiro Nishioka Multiprocessor System, Synchronization Control Apparatus and Synchronization Control Method
US7937709B2 (en) * 2004-12-29 2011-05-03 Intel Corporation Synchronizing multiple threads efficiently
JP4448784B2 (ja) * 2005-03-15 2010-04-14 株式会社日立製作所 並列計算機の同期方法及びプログラム
US8645959B2 (en) * 2005-03-30 2014-02-04 Intel Corporaiton Method and apparatus for communication between two or more processing elements

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07262142A (ja) * 1994-03-18 1995-10-13 Fujitsu Ltd 並列処理制御方式
JPH10111857A (ja) * 1996-10-07 1998-04-28 Nec Corp マルチプロセッサ

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012128808A (ja) * 2010-12-17 2012-07-05 Fujitsu Ltd 並列計算機システム、同期装置、並列計算機システムの制御方法
JP2013025698A (ja) * 2011-07-25 2013-02-04 Nec System Technologies Ltd モジュール、周波数制御方法、及び周波数制御プログラム
JP2015185129A (ja) * 2014-03-26 2015-10-22 三菱電機株式会社 データ処理装置

Also Published As

Publication number Publication date
US20090193228A1 (en) 2009-07-30
CN101925881B (zh) 2013-06-05
JP2009176116A (ja) 2009-08-06
CN101925881A (zh) 2010-12-22
US8108660B2 (en) 2012-01-31

Similar Documents

Publication Publication Date Title
WO2009093680A1 (ja) マルチプロセッサシステムおよびマルチプロセッサシステムの同期方法
US7490217B2 (en) Design structure for selecting memory busses according to physical memory organization information stored in virtual address translation tables
US8645959B2 (en) Method and apparatus for communication between two or more processing elements
US6779065B2 (en) Mechanism for interrupt handling in computer systems that support concurrent execution of multiple threads
KR900004006B1 (ko) 마이크로 프로세서 시스템
US10509740B2 (en) Mutual exclusion in a non-coherent memory hierarchy
US20120198272A1 (en) Priority Based Exception Mechanism for Multi-Level Cache Controller
US20110264866A1 (en) Technique for using memory attributes
KR20190019209A (ko) Ddr 메모리 에러 복구
WO2008022162A2 (en) Systems and methods for program directed memory access patterns
US20090037932A1 (en) Mechanism for broadcasting system management interrupts to other processors in a computer system
JP6005392B2 (ja) ルーティングのための方法及び装置
CN106293894B (zh) 执行事务性功率管理的硬件设备和方法
US20040117743A1 (en) Heterogeneous multi-processor reference design
KR20170031758A (ko) 역방향 메모리 스페어링을 위한 방법 및 장치
US4128881A (en) Shared memory access control system for a multiprocessor system
JP6335253B2 (ja) マルチプロセッサシステム
JP2013092852A (ja) バス接続回路、半導体装置及びバス接続回路の動作方法
JPS63116236A (ja) 情報処理装置
JP2013137833A (ja) マルチプロセッサシステムおよびマルチプロセッサシステムの同期方法
JP2015127982A (ja) マルチプロセッサシステム
CN111045980A (zh) 一种多核处理器
US8112590B2 (en) Methods and apparatus for reducing command processing latency while maintaining coherence
US9378782B1 (en) Apparatus with write-back buffer and associated methods
US20170277647A1 (en) Integrated circuit with pin level access to io pins

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200980103004.X

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09704045

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09704045

Country of ref document: EP

Kind code of ref document: A1