Abstract:
A synchronous apparatus for synchronizing a plurality of processors includes: a register for storing information regarding a group of processors executing parallel processing for associated tasks; a unit for making active the task end information of a processor; a comparator for comparing the information stored in the register belonging to the group with the task end information to check if a synchronization in the group has been completed; a signal line for transferring the task end information to the comparator; and a unit for transferring a comparison result by the comparator to the processor.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to a multiprocessor system, and more particularly to a synchronous apparatus suitable for synchronizing processors. 
     Conventional synchronous processing for multi-processors basically adopts a synchronizing (or process ordering) scheme for tasks wherein tasks are processed based on a task driven order or a data driven order. In case of general purpose multi-processors, a data flow processing scheme or a token control scheme has been adopted wherein task end flags are provided in a common memory in order for each task to check if all necessary preceding task processes have been completed. 
     A synchronous processing of this type is described in Japanese publication &#34;Multi-microprocessor System&#34;, pp. 117 to 122, Keigaku Shuppan, November 1984. 
     An example of conventional apparatus for a multi-processor system is disclosed in U.S. Pat. No. 4,493,053. 
     Conventional technology for general purpose multi-processor systems relies largely upon software and requires a number of items to be checked, thus leading to a large overhead for synchronous processing among tasks (i.e. regulating the priority order of task processing) or processors. Therefore, there arises some problems that tasks cannot be divided in pieces and the task processing order in its parallel operation is restricted unduly. Parallel processing of jobs cannot be positively used, thus resulting in a hardship in attaining high efficiency. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide a synchronous apparatus for processors capable of minimizing the overhead for synchronous processing among tasks or processors in parallel operation of general purpose multi-processors. 
     The above object of the present invention can be solved by taking into consideration the fact that the number of tasks processed at one time by general purpose multi-processors does not exceed the number of processors, converting all problems of synchronization in parallel processing into the problems in synchronization among processors, and utilizing hardware for synchronous processing among a definite number of processors thereby to minimize software overhead. 
     Particularly, there is provided correspondence between a plurality of bits and a finite number of processors, respectively. After completing task processing, each processor sets a bit train (word data) in a synchronous register, the bit train having active bits representative of processors executing associated tasks. The processor also makes its task end line active. A comparator compares task end lines of the task processing processors with the bit train to monitor if those processors have completed task processing. If comparison results indicate all true, synchronization is assumed and this status is indicated to the processor. The above operation is realized using hardware to the extent that the system versatility is not damaged. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a hardware block diagram showing an embodiment of a synchronous apparatus for processors according to the present invention; 
     FIG. 2 shows the comparator circuit shown in FIG. 1; 
     FIG. 3 is a hardware block diagram showing another embodiment of a synchronous apparatus for processors according to the present invention; 
     FIG. 4 shows the comparator circuit shown in FIG. 3; and 
     FIG. 5 shows an example of control in parallel processing by the synchronous apparatus of this invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     A preferred embodiment of this invention will be described with reference to FIG. 1. 
     A multi-processor system in this embodiment is assumed to be constructed of m processors among which processors 1 n  and 1 n+1 . are shown in FIG. 1. Each processor is provided with a processor synchronizing circuit 2 n , 2 n+1 . Information is transferred among the synchronizing circuits 2 n  and 2 n+1  via signal lines 8. According to the present invention, processors for executing associated tasks are classified into a group arbitrarily to perform their processings while assuring synchronization of the group. Each processor synchronizing circuit 2 n , 2 n+1  is provided with a synchronous register 5, a flip-flop 7, a signal line 8 on which the status of the flip-flop 7 is broadcast to each processor, a monitoring circuit 6 and a signaling circuit for informing the check result produced by the monitoring circuit 6 to a corresponding processor. The synchronous register 5. stores therein information regarding which processors are included in a group. The flip-flop 7 is triggered simultaneously with or after the time when signals of &#34;1&#34; or &#34;0&#34; are set in the register 5. The monitoring circuit 6 monitors the broadcast contents for those processors designated in the synchronous register 5 to check if the status of all the processors in a group stored in the register 5 becomes true. There are also provided an access signal 4, a status line 9 and a trigger signal line 10. 
     The synchronous operation sequence of the processors in a group will be described. It is assumed that the processors 1 n  and 1 n+1  of processors 10 to 1 m  constitutes a group for executing associated tasks. First, the description will be directed to the operation of the processor 1 n . After completing task processing, the processor 1 n  sets &#34;1&#34; in the n-th and (n+1)-th bits of the synchronous register 5 via a data line 3 and &#34;0&#34; in the other bits to thereby write a bit train (indicative of a group of processors). During the write operation, the signal line 4 is supplied with an active pulse indicating that the processor n is accessing the synchronous register 5, the pulse serving as a write clock signal of the synchronous register 5. The flip-flop 7 is triggered by the pulse on the signal line 4 at the same time so that a task end signal of &#34;0&#34; level is outputted at its Q terminal, and a status signal of &#34;1&#34; level at its Q terminal. The write clock signal of the synchronous register 5 and the trigger signal for the flip-flop 7 may be provided separately to independently execute the information write-in operation to the synchronous register and the output operation of a task end signal by the flip-flop 7. The task end signal from the terminal Q is sent via the n-th task end signal line 8 to each synchronizing circuit 2 0  to 2 m  of a corresponding processor. The status signal from the terminal Q is inputted to a TEST terminal of the processor 1 n  via the status line 9 to interrupt the processing by the processor until the TEST input changes to &#34;0&#34; level. The signal set in the synchronous register 5 and the signals on the signal lines 8 are inputted to the respective units 0 to m of the monitoring circuit 6, respectively, so that each unit receives the corresponding signals on the register 5 and the signal line 8. The internal arrangement of the monitoring circuit 6 is shown in FIG. 2. If the value in the synchronous register is &#34;0&#34;, an output of a NAND gate becomes &#34;1&#34; irrespective of the value on the signal line 8. Therefore, if all the values on the task end signal lines 8 corresponding to those bits &#34;1&#34; previously set in the synchronous register 5 become &#34;0&#34;, i.e., if the n-th and (n+1)-th task end signal lines 8 becomes &#34;0&#34; in this example, an output of NAND gate 18 changes to &#34;0&#34; so that a trigger signal 10 changes to active &#34;0&#34;. 
     Upon receipt of this trigger signal, the flip-flop 7 is preset to change the task end signal from the Q terminal to &#34;1&#34; level and hence the n-th task end signal line 8 to &#34;1&#34; level. Thus, the trigger signal 10 from the monitoring circuit 6 is changed to &#34;1&#34; level. At the same time, the status signal from the terminal Q also changes to &#34;0&#34; level and hence the TEST input of the processor 1 n  is changed to &#34;0&#34; level, causing the processor 1 n  to start processing again. The processor 1 n+1  operates in the same manner as above so that in this embodiment the processors 1 n  and 1 n+1  are synchronized at the time when both processors complete the task processing. 
     The synchronous operation sequence by the synchronous apparatus for processors of this invention has been described above. According to the present invention, only the write process to the synchronous register is performed by software involving one machine instruction. The other processing is executed using hardware so that the overhead of synchronous processing can be minimized. Further, processors are classified into a group using only a single synchronizing circuit for each processor so that synchronous processing can be performed for the processors belonging to one group. Furthermore, by providing a plurality of synchronizing circuits for each processor, it becomes possible to perform multi-synchronous processing for processors of plural groups. Classification of processors into a group and multi-synchronous processing gives flexibility of parallel processing to thereby enable a highly efficient parallel processing like a data flow per se in a general purpose multi-processor system. 
     Another embodiment of this invention is shown in FIGS. 3 and 4. In this embodiment, all bits in the synchronous register 5 are set to &#34;1&#34; to handle the processors belonging to a single group. Such a case is defined as overall synchronization. The circuit shown in FIG. 3 is used for performing the overall synchronization for all the processors. FIG. 4 shows an example of the monitoring circuit 6 shown in FIG. 3. The fundamental circuit arrangement is identical to that of the embodiment shown in FIG. 1. The overall synchronization is equivalent to that when the objects to be monitored by the monitoring circuit 6 are all set &#34;1&#34;. Therefore, if all values at the task end signal lines 8 become &#34;0&#34;, the output of the NAND gate 18 changes to &#34;0&#34; level and hence the trigger signal 10 to active &#34;0&#34;. If the overall synchronization only is intended, the synchronous register 5 can be omitted in performing synchronous processing for processors. 
     FIG. 5 shows how the parallel processing control is performed by the synchronous apparatus among processors of this invention. In the Figure, it is assumed that four processors a to d are controlled to be parallel processed as time passes downward in the Figure by the synchronous apparatus for processors of this invention. First, associated tasks 1 and 2 are processed by the processors a and b. Similarly, tasks 3 and 4 are processed by the processors c and d. The processors executing associated tasks are classified into a group, i.e., in this case, the processor a and b constituting a group 11, and the processors c and d constituting a group 12. A solid line arrow interconnecting tasks represents a process and data flow using the same processor, whereas a one-dot chain line arrow represents a data flow of tasks executed by a different processor in the same group, i.e., a data transfer between processors in the same group. A need arises at time t1 and t2 to transfer data between two groups. After synchronous processing by the synchronous apparatus for processors of this invention, the processed data is exchanged between the processors. Thereafter, the group having the processors a and b proceeds to process tasks 5 and 6, whereas the group having the processors c and d proceeds to process tasks 7 and 8. As above, the synchronous processing by the synchronous apparatus of this invention indicates which processors have been classified into a same group to process the tasks. Since no data transfer occurs between different groups, it becomes possible to independently and flexibly process each group in parallel, to thereby realize a highly efficient parallel processing. Groups 13 and 14 include the same processors as those in the groups 11 and 12 to perform task processing, and synchronous processing at time t3 and t4 to thereafter effect data transfer between processors. At time t5, tasks 9 to 12 become associated with each other so that independence of groups disappears. In this case, after once performing synchronous processing of each group, all processors are synchronized again using another synchronous apparatus for processors. Namely, it can be considered that synchronous processing between groups has been performed by the other synchronous apparatus for processors. Thus, the group 15 contains all the processors. Thereafter, processors a to c executing associated tasks 13 to 15 are caused to constitute a group 16, whereas processor d executing a single task 16 is caused to constitute a group 17. With these re-arranged groups, the synchronous processings are performed in parallel at time t6 and t7. As described so far, use of synchronous apparatus for processors in a multiple manner enables a simple re-arrangement of groups and a more flexible and highly efficient parallel processing. 
     According to the present invention, in order to process a fixed job in the form of divided tasks by general purpose multi-processors, processors for executing associated tasks are classified into a group to adopt a synchronous processing method for synchronizing processors in the same group or in different groups. Thus, the synchronous apparatus for processors can be implemented using hardware as much as possible to the extent that the system is allowed to be operated using a software program, thereby effectively minimizing software overhead in synchronous processing.