A multiprocessor system

Abstract: In a multiprocessor system, where in each local group a processor (ll, l2) and its local memory (2l, 22) are included, and the local memory (2l, 22) is accessed from either processor (ll, l2) in the same group or other group through a communication medium, the system according to the present invention is provided with a LOCK flag, a SYNC flag and a control circuit (3l, 32) for controlling access to the own memory (2l; 22) from the own processor (ll; l2) and the other groups processor (l2; ll) depending on the status of the flags. The LOCK flag inhibits a reading-out of the memory (2l; 22) from the other processor (l2; ll) while the own processor (ll; l2) is writing therein. The SYNC flag permits reading-out the memory (2l; 22) from other processor (l2; ll) and inhibits the own processor (ll; l2) to write therein. A read request as well as a write request to the memory (2l; 22) from the processors (ll, l2) are inputted to the control circuit (3l, 32) which controls the conveyance of the requests to the memory (2l, 22). Thus, the flag setting/resetting is carried out within a group, therefore, the sychronization software which requires much of overhead, or control lines which interconnects the processors (ll, l2) are not necessary, resulting in accomplishment of a reduced network traffic, that is, a high speed multiprocessor operation.

Description: This invention relates to a communication scheme between processors in a multiprocessor computer architecture. More particularly, this invention relates to an improvement of accessing a shared memory which is located in each processor group and is used for inter-processor data transmission. In the past several years, a multiprocessor system has been intensively employed, where a plurality of processors are provided, with which a data processing is carried out concurrently in parallel so that a high-speed operation a single processor never achieve can be realized. Among several types of the multiprocessor systems, the present invention relates to the one having a shared memory located in each processor group exclusively for transferring the data as shown in FIG. 1. In order to achieve the high-speed operation, the processors in operation are required that a data transfer between the processors must be synchronized with a data processing therein. The above-referred term "synchronize" or "synchronization" is hereinafter used to mean an adjustment of timing to start and stop the tasks which competes with each other. Therefore, in the multiprocessor system, an easy means for fast operation of this synchronization has been necessarily requested. A method of processor synchronization employed in the prior art system by a software control is shown in FIG. 2. A processor PA having its local memory LMA, i.e. a memory which is directly accessed from its processor, and another processor PB having its local memory LMB are interconnected with each other by a communication network 3, as communication means, thus composing a multiprocessor system. The communication network 3 may be a bus or another network, such as a local-area network or a telephone line. For the second processor PB to read or write the memory LMA of the first processor PA, the second processor PB must check the status of the local memory LMA by the flags through the communication network 3 by the use of a predetermined protocol. In other words, some particular bits, the so-called semaphore flags, are provided on the memory, and the synchronization is carried out by the so-called "Test and Set" command using the semaphore flags. Problems of this method are: 1) the software for the synchronization is very complex as well as requires much of the overhead operation, i.e. an operation required for indirect jobs, though the hardware is simpler than the below-described second method, and 2) the communication for the synchronization control via the network causes an increase of the network traffic. Accordingly, efficiency of the network throughput is deteriorated, or the network is required to be of a higher performance capability. A second method of the processor synchronization employed in the prior art system achieved by a hardware control is shown in FIG. 3. Similarly to the configuration of FIG. 2, processors PA and PB each having the local memory have a control line 4 between two processors, and has a communication means 5 and 5′ directly connected from a processor to the other processor's local memory. Each of the communication means 5 and 5′ includes a data bus 52 and a control line 51 for the access control. The line 4 is used exclusively for synchronization control. In this system, the load of the software as well as the overhead operation of the system is light. However, the line 4 for synchronization must be installed between all the processors to form a complete graph as shown in FIG. 4, where, as an example, five processors P1 through P5 are included. The required quantity of the control lines 4 for the system is n(n-1), where n indicates number of the processors. Therefore, the problem is that the hardware structure of the system becomes too much complicated to be applied to a large scale multiprocessor system. A third method of the processor synchronization is carried out by a hardware or a combination of a hardware and a sofware, as reported in "Multiprocessor Cache Synchronization" by Philip Bitar et al on IEEE International Symposium on Computer Architecture l986. However, there are still same problems as those of the software control. The latest trends of the multiprocessor synchronization system are also reported in papers: "A Class of Compatible Cache Consistency Protocols and their Support by the IEEE Futurebus" by Paul Sweazey et al on the same issue, and "Cache Coherence Protocols: Evaluation Using Multiprocessor Simulation Model" by James Archibald et al on ACM (Association for Computing Machinary) Transaction on Computer Systems, vol. 4, No. 4, Nov. 1986. It is a general object of the invention, therefore to provide a multiprocessor system having a simple hardware configuration as well as having no load of the software for the processor synchronization, and achieving a high speed processor operation and a high performance capability of the network. According to the multiprocessor system of the invention, a set of flag bits, i.e. a LOCK bit and SYNC bit, and a control circuit for controlling accesses to a local memory are provided to each processor group. When the LOCK bit is in a SET state, a reading-out of the local memory in the first processor group from the second processor is inhibitted while the first processor is writing into the local memory. The SYNC bit in a RESET state accepts a read request to the local memory from the second processor after the first processor finishes writing into the local memory, as well as inhibits writing into the local memory from the first processor. Accordingly, the setting of the LOCK bit as well as the resetting of the SYNC bit can be carried out within each group without using the network communication. And, the setting of the SYNC bit is carried out implicitly by the memory access, in other words, it does not require a network communication. Therefore, the software is free from the job for synchronization, and the network for the synchronization control is replaced by the access control lines. Thus, a reduced network traffic or a less sophisticated network is accomplished owing to the deletion of the synchronization control via the network, resulting in a high speed processor operation as well as a high performance capability of the network. The above-mentioned features and advantages of the present invention, together with other objects and advantages, which will become apparent, will be more fully described hereinafter, reference being made to the accompanying drawings forming a part hereof, wherein like numerals refer to like parts throughout. The invention and its embodiments are explained more fully in the following detailed description with reference to the drawings, in which: FIG. 1 shows a general concept of a multiprocessor system using a memory for data transfer. FIG. 2 shows schematic configuration of a prior art multiprocessor system where the synchronization is controlled by software. FIG. 3 shows schematic configuration of a prior art multiprocessor system where the synchronization is controlled by hardware with an additional software for synchronization control. FIG. 4 shows required networks in the configuration of FIG. 3. FIG. 5 shows schematic configuration of a multiprocessor system according to the present invention. FIG. 6 shows the control circuit in detail used for the present invention. FIG. 7 shows a truth table of the flags of the present invention. FIG. 8 shows flow charts for explaining the operation of the present invention. FIG. 9 shows a truth table corresponding the flow shown in FIG. 8. An embodiment of the present invention is hereinafter described referring to a principle block diagram of FIG. 5, where the multiprocessor system is composed of two processors 11 (PA) and 12 (PB) shown as representatives of a plurality of processors. Each processor PA and PB has own local memory LMA and LMB respectively. The term "own" is used to mean "belonging to the same group", i.e. in other words "accessable without using a network". A term "other" is hereinafter used to mean the contrary meaning of the "own". The memory LMA of the group A is accessed from the own processor PA and also from the processor PB of the other group B, thus the memory is shared by the two processors. A control circuit 31 (CTLA) having a set (41) of flag bits, one named a LOCK bit another one named a SYNC bit, are provided in the group A, for controlling the transfer of an access request from the processor PA or PB to the memory LMA. Symmetrically similar to the control circuit CTLA, a second control circuit 32 (CTLB) having a set of flag bits (42) is provided in the group B, for controlling the transfer of an access request from the processor PA or PB to the memory LMB. Function of the control circuits and the flag bits shall be described in detail later on. Communication means 6 (or 6′) between the processors PA (or PB) and each own local memory LMA (or LMB) are composed of: data buses 11-21D, 12-22D, for each processor PA, PB to write a data into each own memory LMA, LMB; and access control lines 21-11C, 22-12C, each for delivering an acknowledge signal ACK to each request source PA, PB. Communication means 7 (or 7′) between the processor PA (or PB) and the memories LMB (or LMA) of their respectively opposite groups are composed of: data buses 21-12D, 22-11D, for each processor PB, PA to read a data out of their respectively opposite group's memory LMA, LMB; access control lines 21-12C, 22-11C, each for delivering an acknowledge signal ACK to each request source PB, PA; and access control lines 11-32C, 12-31C, each for delivering a read request signal "Read REQ" from each other processor PB, PA to each own control circuit CTLA, CTLB. The functions of the flag bits 41 (or 42) of the processor PA (or PB) are as follows: [1] The LOCK bit 41-1 (or 42-1) and the SYNC bit 41-2 (or 42-2) of each group A, B are both set by initialization respectively by their own processor PA (or PB). [2] The LOCK bit 41-1(or 42-1) is set before the own processor PA (or PB) writes data in the own memory LMA (or LMB), as well as is reset after the writing is finished, by the own processor PA (or PB). [3] The SYNC bit is reset as soon as the own processor PA (or PB) finishes writing data into the own memory LMA (or LMB). [4] When the LOCK bit and the SYNC bit are both in a SET state, a read request signal "Read REQ" from the other processor PB (or PA) to the own memory LMA (or LMB) is inhibitted; and a write request signal "Write REQ" from the own processor PA (or PB) to the own memory LMA (or LMB) is permitted. [5] When the LOCK bit is in a RESET state and the SYNC bit is in a SET state, the "Write REQ" from the own processor PA, (or PB) is inhibited, and the "Read REQ" from the other processor PB (or PA) is permitted. [6] When the status of the flag bits are other than those of above-described [4] and [5], a write request "Write REQ" from the own processor PA (or PB) to the own memory LMA (or LMB) is inhibitted and a read request signal "Read REQ" from the other processor PB (or PA) to the own memory LMA (or LMB) is permitted. The operation of the processor synchronization according to the present invention is hereinafter described, referring to a sample case where the processor PA writes data into the own memory LMA and then the other processor PB reads out this written data, and the same sequence is repeated. A typical structure of the control circuit 31 or 32 (CTLA or CTLB) and the flag bits 41 (or 42) are shown in FIG. 6, and its truth table is shown in FIG. 7, where a positive logic is employed. As shown in FIG. 6, the control circuit CTLA 31 (or CTLB 32) is composed of AND gates 3a, 3b, 3c and a delay circuit 3d. The flag bit 41 is composed of widely used memory devices, such as flip-flops, one, 41-1, for the LOCK bit and one, 41-2, for the SYNC bit. The AND gate 3a is gated by the LOCK bit as well as the SYNC bit. One of the input terminals of the AND gate 3c is gated by the read request signal "Read REQ" from other processor 12 (PB), because the data transfer is from the own processor 11 (PA) to the other processor 12 (PB). One of the input terminals of the AND gate 3b is gated by the write request signal "Write REQ" from the own processor 11 (PA). The delay circuit 3d, formed of widely used delay device to produce a predetermined delay time, which is equivalent to the time required for finishing reading a data to be transferred by a single operation. Accordingly, the SYNC bit 41-2 is automatically set as soon as the reading is finished. Thus the control circuit CTLA and the flag bits operate as shown in the truth table of FIG. 7, where "Y" indicates that the request is permitted and "N" indicates that the request is inhibitted. Flows of the over all operations for synchronizing the independently operating processors of the two groups, where the A group includes the processors 11 (PA), the memory 21 (LMA), the circuit control and 31 (CTLA) and its flag bits 41, and the B group includes the processors 12 (PB), the memory 22 (LMB), the control circuit 32 (CTLB) and its flag bits 42, as described below and shown in FIG. 8. The numerals for the procedure steps are also cited in the flow charts of FIG. 8. Dotted lines in FIG. 8 show "flows" of the flag information. (1) Each of the LOCK bits (41-1, 42-1) and SYNC bits (41-2, 42-2) of the processors 11 and l2 is set as an initialization before beginning the operation, and in this state of the flag bits: the own processor 11 (PA) is permitted to write into the own memory 21 (LMA); and the other processor 12 (PA) is inhibitted to read the same memory 21 (LMA). (2) The processor 11 (PA) be sure to set the LOCK bit 41-1 before writing data into the own memory 21 (LMA). (However, the first setting after the initialization is not necessary because the setting is duplicate.) (3) The processor 11 (PA) writes data into the own memory 21 (LMA), and on the other hand, the other processor PB has transmitted a read request signal, Read REQ, to the control circuit 31 (CTLA) and been waiting for the acknowledgement signal ACK. (4) As soon as the writing-in is finished, the LOCK bit 41-1 as well as the SYNC bit 41-2 is reset, and acknowledge signal ACK is transmitted from the memory permitting the processor 12 (PB) to read out the memory 21 (LMA). (5) The control circuit 31 (CTLA) sets the own SYNC bit 41-2 at the predetermined delayed time after the "Read REQ" signal from the other processor 12 (PB). At this time the reading-out by the other processor 12 (PB) is already finished. (6) The processor 11 (PA) operates other jobs, which is not related to the explanation of the invention, and then; returns to the step (2), and sets the own LOCK bit 41-1; and writes into the own memory 21 (LMA) unless the SYNC bit 41-2 is still in a RESET state inhibitting the writing. (7) The processor 12 (PB) in the B group returns to the step 4 after finishing other jobs. Consequently, the above-described operation is summarized as follows: (A) When the processor PA is writing into the own memory LMA, the other processor PB is inhibitted to read out this memory LMA. (B) After the processor PA finishes writing into the own memory LMA, this processor PA is inhibitted to write next data into this memory until the other processor PB finishes reading out this memory. (C) The processor PB is inhibitted to read out the other memory LMA, after reading out the same memory until the writing from the processor PA into the same memory is finished. Though in the above-described embodiment of the invention the local memory LMA is written in exclusively by the own processor PA as well as readed out exclusively by the processor PB of the other group B, it is apparently possible for the reverse case where the local memory LMB is readed out by the own processor PA as well as written in by the processor PB of its own group B. Though in the above-described embodiment of the invention a single set of flag bits having one for LOCK and one for SYNC is provided in each group A or B, each group may be provided with a plurality of the sets of flag bits, wherein each set communicates with a corresponding one of a plurality of the processors. Though in the above-described embodiment of the invention a set of the LOCK bit and the SYNC bit is provided in association of with data of a single word, it is also apparently possible to provide a set of LOCK and SYNC bits associated with a set of data consist of a plurality of words, or to compose the local memory with a plurality of these sets. The configuration of the control circuit 31 of FIG. 6 is referred to as a typical sample, any other circuit configuration which achieves the above-described function can be used in place of the circuit shown in FIG. 6. Advantages of the present invention are: Firstly the fact that the setting/resetting of the flags can be carried out by the internal communication within each group as well as by a memory access from other group, contributes to achieve a simple network configuration without requiring the control lines 4 used only for synchronization. Secondly the software can be perfectly free from the job for synchronization, because the processor can be waited by inhibitting the access request signal, resulting in a reduced network traffic, that is, a high-speed operation, and Thirdly the simplified hardware helps achieve a high-speed synchronization operation.

Claims: A multiprocessor system including at least two groups (A;B) being interconnected via a network to carry out data communication between said groups, each group comprising: a processor (11;12); a memory (LM A ,21; LM B ,22) to be accessed, i.e. read out or written in by the processor (11; 12) of the group (A; B) or the processor (12; 11) of the other group (B; A); first memory means (LOCK, 41-1; LOCK, 42-1) for inhibiting the access from the processor (12; 11) of the other group (B; A), while the processor (11; 12) of the group (A; B) is accessing said memory (LM A ,21; LM B ,22) of the group (A; B); second memory means (SYNC, 41-2; SYNC, 42-2) for accepting an access request from the processor (12; 11) of the other group (B; A) and for inhibiting an access from the processor (11; 12) of the group (A; B); and a control circuit (CTL A , 31; CTL B , 32) for controlling the access to said memory (LM A ,21; LM B , 22) by the use of said first and second memory means (LOCK,41-1, SYNC, 41-2; LOCK, 42-1, SYNC, 42-2) of the group (A; B) and only an access request signal of the processor (12; 11) of the other group (B; A), whereby said data communication is accomplished by the use of the memory (LM A , 21; LM B , 22) of the group (A; B). The multiprocessor system of claim 1, wherein said first memory means (LOCK, 41-1; LOCK, 42-1) is set when the processor (11; 12) of the group (A; B) is accessing said memory (LM A , 21; LM B , 22) of the group (A; B); said first memory means (LOCK, 41-1; LOCK, 42-1) and said second memory means (SYNC, 41-2; SYNC, 42-2) are reset when the access is finished; and said second memory means (SYNC, 41-2; SYNC, 41-2) is set when an access of the processor (12; 11) of the other group (B; A) to said memory (LM A , 21; LM B , 22) of the group (A; B) is finished, said access having been accepted by the control circuit (CTL A , 31; CTL B , 32) because of said first and second memory means (LOCK, 41-1, SYNC, 41-2; LOCK, 42-1, SYNC, 42-2) having been reset. The multiprocessor system of claim 2, wherein said second memory means (SYNC, 41-2; SYNC, 42-2) is set at a predetermined delayed time after the access of the processor (12; 11) of the other group (B; A) to said memory (LM A , 21; LM B , 22) of the group (A; B) is finished. The multiprocessor system of any one of the preceeding claims, wherein said memory (LM A , 21; LM B , 22) of the group (A; B) is written in by the processor (11; 12) of the group (A; B) only and read out by the processor (12; 11) of the other group (B; A) only. The multiprocessor system of claim 4, wherein the processor (12; 11) of the other group (B; A) reads out the memory (LM A , 21; LM B , 22) of the group (A; B) by a read request (READ-RQ) via said network.

Inventors: JINZAKI AKIRA, JINZAKI, AKIRA
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1987
Main classification: G06F15
IPC codes: G06F15, G06F9