METHOD OF ARBITRATING ACCESS TO A SHARED RESOURCE AMONG A PLURALITY OF UNIQUELY IDENTIFIED PROCESSORS

Abstract: A data communication method is disclosed which can be used to implement an unbiased arbitration system. This method can be used to identify one of N<=2**m processors (U-0,U-1,U-15) requesting access to a shared resource (102). Each of the processors is designated by a unique m-bit identifier. This method can also be used to enable the host (101) to detect the processing states of said N processors in no more than m interchanges between the host and the processors.

Description: This invention relates to the communication of data in a multiprocessor system. More particularly, it relates to a method for communicating data between a plurality of individually identifiable processors in a data processing system. In a multiprocessor system where a common resource cannot be used simultaneously by more than one processing unit, access to the resource must be arbitrated among simultaneous requestors. Arbitration can be achieved by time-division multiplexing whereby each processing unit is allotted a specific time slot during which it can have the exclusive use of the resource. The drawback for this approach, as manifested in a system where processors operate in burst mode, is that time which could otherwise be used by processors needing the resource must also be allotted to idle processors, thus decreasing the utilization of the resource. In another arbitration method, as described by Tanenbaum, "Computer Networks", Prentice-Hall Publishing Co., 1981, each processor is required to detect the existence of a collision while it is attempting to gain access to the resource. If a collision is detected, the processor must perform a randomization process before a request is retried. Because of the randomization requirement, this method does not guarantee when a processor may gain access to the resource. Chiarottino et al, USP 4,470,110, "System for Distributed Priority Arbitration Among Several Processing Units Competing for Access to a Common Data Channel", issued September 4, 1984, describe an arbitration method whereby each processor is assigned a priority number. During contention time, iterative bit comparisons are made among all the priority numbers forwarded by the requestors. After each bit comparison, a subset of requestors, which have comparatively lower priority numbers at that bit position, is removed until the processor with the highest priority number ultimately gains access to the resource. Grimes, USP 4,463,445, "Circuitry for Allocating Access to a Demand-shared Bus", issued July 31, 1984, describes a similar method in which the priority numbers are modified by parameter bits which reflect some states of the requestors. His method prioritizes requests first by the states and then by the priority numbers of the requestors. A similar method is described in Taub, "Arbitration and Control Acquisition in the Proposed IEEE 896 Future Bus", IEEE MICRO, August 1984, pp. 28-41. These prioritized arbitration methods lack flexibility because selection of a processor to which access is granted is fixed by the assignment of priority numbers. US-A-3 863 225 discloses a method of control of a data processing system by means of which a selection of one of a plurality of functional units with different connection priority is carried out. It comprises forming first and second words ("Value" and "Complement" states) composed of the highest values of fed-in criterion signals occuring per value position in each case and the place number of which coincides with that of the criterion signal fed in, or corresponds to the greatest occuring place number of these criterion signals. Said "Value" and "complement" states are compared with each functional unit identification number by subtraction of the latter from the former, and the resulting difference determines which functional unit/s are to be further evaluated. An iteration is carried out until only one functinal unit remains connected. There is a need for an improved method in which all the requestors are identified in an unbiased manner. Based upon this method, a centralized arbitration system can be implemented in which the selection of a requestor depends purely on an algorithm executed within a host. The advantages of such a system include the following: 1. The host can service a multiplicity of unranked processors with a scheme that can be changed dynamically, depending on the state of the system. 2. The complexity and functional characteristics of the arbitration system can be made to depend on changeable software running within the host. 3. A subset of requestors to whom access to the resource cannot be granted for some operational reasons can be identified and ignored readily by the host. 4. The time and hardware required for processing the arbitration is kept at a minimum. 5. The number of steps required to identify a subset of requestors does not increase exponentially according to the number of processing units needing the resource. The present invention is disclosed in the attached claims. One object of this invention is to facilitate the resolution of access conflicts among N<=2**m requestors in a centralized arbitration system by identifying requestors in an unbiased manner. Another object is to identify a requestor in no more than m-1 interchanges between the host and the requestors. An additional object is to allow a host to detect the processing states of N processors in a multiprocessor system in no more than m-1 interchanges between the host and processors. According to the invention, a data communication method is disclosed which can be used to implement an unbiased arbitration system. This method can be used to identify one of N<=2**m processors requesting access to a shared resource. Each of the processors is designated by a unique m-bit identifier. This method can also be used to enable the host to detect the processing states of said N processors in no more than m interchanges between the host and the processors. The method, according to the invention as set forth in claim 1, comprises the following steps: A requestor puts its identifier on a common bus. A binary complement of the identifier is also created. The identifiers of all processors are then combined to form a first m-bit word. Similarly, a second m-bit word is formed by logically combining the binary complements of the identifiers. An m-digit subset identifier is then created to designate a subset of requestors, each digit taking a value which, as illustrated, depends on one of four possible logical combinations of a bit from the first word and a bit of like significance from the second word. The maximum size of the subset of requestors is then a function of the number of conflicting bits between said two words and the subset of processors which includes all requestors can be identified as a function of the positions of the conflicting bits. The arbitration process then replaces one conflicting digit, arbitrarily or otherwise, with a value of 0 or 1, thereby eliminating one or more requesting processors from the subset. The above process is iterated until there remains only one requestor, to which access is granted. Brief Description of the Drawing Fig. 1 is a simplified block diagram of the system embodying the present invention. Fig. 2 is a block diagram of the arbitration module used by the central processor in resolving contention among processors requesting access to a shared resource. Fig. 3 is a block diagram of the request module wherein requests for access to a shared resource are made by a processor. Fig. 4 is a timing diagram showing the operational relationship of the several clock signals used in the arbitration process. Fig. 5 is a block diagram of the module which generates the timing signals used in the arbitration process. Description of the Preferred Embodiment As illustrated in Fig. 1, the multiprocessor system embodying the invention comprises 16 processors, U-0 to U-15, connected to an 8-bit-wide common bus 100, which in turn is linked to a central processor 101. Each processor U is identified by a unique 4-bit address (i.e. from binary 0000 to 1111). Processors U-0 to U-15 share a common resource 102 (e.g. a data base, a costly I/O device, etc.), the access to which is controlled by central processor 101. Requests for access to common resource 102 are made by request modules 103-0 through 103-15 of processors U-0 through U-15. Access arbitration is performed by an arbitration module 104 of central processor 101. System clock signals 107 through 110 are generated by a system timing generator 111 which comprises conventional digital circuits well known to the art. Central processor 101 addresses a subset of processors U-0 through U-15 by sending an identifier YY which consists of two 4-bit components, P and Q. For a given processor, the ith bit of P and the ith bit of Q conform to the following rule: As an example, central processor 101 can address processor U-3 (binary address 0011) by sending an identifier with P equal to 0011 and Q equal to 1100. According to Table 1, P and Q combine to form a YY identifier of [0011] . For given values of P and Q, the values of YY are defined. Conversely, given the values of YY, the values of P and Q are defined. Moreover, a given value of YY can be used to address a unique subset of processors within the multiprocessor system. As an example, assume that central processor 101 wants to address both U-1 (binary address 0001) and U-3 (binary address 0011) simultaneously. Since the third bits of these two processors' addresses are different, a first word of P equal to 0011 and a second word of Q equal to 1110 would be sent. According to Table 1, P (0011) and Q (1110) combine to form a YY identifier of [00X1] which indicates a "don't care" value in the third identifier bit position. Access Arbitration When common resource 102 is available, central processor 101 sends a START signal 105 to arbitration module 104 to start the arbitration process. The START signal is sent by means of an I/O operation performed by central processor 101 on one of its output ports. As will be described later, the START signal causes arbitration module 104 to send an identifier YY with a first word P equal to 1111 and a second word Q equal to 1111. When combined in accordance with Table 1, P (1111) and Q (1111) form a YY identifier of [XXXX]. Since this YY identifier addresses all processors, any processors within the system needing access to resource 102 can submit their requests to the arbitration module 104. When a processor U-j needs access to resource 102, it sends a signal ASK-j to its request module 103-j. The ASK-j signal is sent by means of an I/O operation performed by processor U-j on one of its output ports. If the ASK-j signal is active while the YY identifier sent by arbitration module 104 includes processor U-j, request module 103-j would put processor U-j's address on bus 100 during a designated response time. For each ith address bit Bj<i> sent to bus 100, request module 103-j also sends Cj<i>, which is the binary complement of Bj<i>. By the nature of the bus structure, the corresponding bit B<i> received by arbitration module 104 is the ORed result of all the Bj<i> bits simultaneously sent by processors U-0 to U-15. Similarly, the corresponding bit C<i> received by arbitration module 104 is the ORed result of all the Cj<i> bits simultaneously sent by the processors U-0 to U-15. As a result, B<i>=0 if and only if all the Bj<i>'s are 0's; =1 if and only if there is at least a "1" among the Bj<i>'s. C<i>=0 if and only if all Cj<i>'s sent are 0 or, alternatively, if and only if all Bj<i>'s sent are 1's; =1 if and only if there is at least a "1" among the Cj<i>'s sent or, alternatively, if and only if there is at least one "0" among the Bj<i>'s sent. If a value is assigned to each possible combination of B<i> and C<i>, and a symbol YY<i> is used to represent all such values, then all possible combinations of B<i> and C<i> and the situations under which such combinations occur can be summarized in the following table: Assume now that processors U-0, U-1, U-2, U-12, U-13,and U-14 (binary addresses 0000, 0001, 0010, 1100, 1101, and 1110) need access to resource 102. The request module 103 of each of these processors then puts its address and the binary complement thereof onto common bus 100. Accordingly, the first address B received by arbitration module 104 (which is the ORed result of 0000, 0001, 0010, 1100, 1101, and 1110) is 1111. Correspondingly, the second address C received by arbitration module 104 (which is the ORed result of the complemented addresses 1111, 1110, 1101, 0011, 0010, and 0001) is 1111. When the addresses B equal to 1111 and C equal to 1111 are combined in accordance with the rules given in Table 2, the resulting YY identifier received by arbitration module 104 is [XXXX]. Many algorithms can be used to eliminate a subset of the requesting processors. For example, each "X" in the YY identifier can successively be replaced with a "0" or a "1" by a randomization process. It is assumed, however, that arbitration in this system proceeds by setting the leftmost unresolved YY bit to "0". Accordingly, arbitration module 104 sends a YY identifier of [0XXX] to the processors. This is done by sending a P component of 0111 and a Q component of 1111 to the processors. Among the original requesting processors U-0, U-1, U-2, U-12, U-13, and U-14, the YY identifier of [0XXX] addresses U-0, U-1, and U-2 (binary addresses 0000, 0001, and 0010). As a second iteration, U-0, U-1, and U-2 send their addresses and binary complements thereof to arbitration module 104 simultaneously, resulting in a YY identifier of [00XX] received by arbitration module 104. Arbitration module 104 again replaces the leftmost unresolved YY digit with a "0", sending a YY identifier of [000X]. This is accomplished by sending a P component of 0011 and a Q component of 1111 to bus 100. Among the remaining requesting processors U-0, U-1, and U-2, only U-0 and U-1 (binary addresses 0000 and 0001) are addressed. Their request modules therefore send their addresses and the binary complements thereof in the same manner, resulting in a YY identifier of [000X]. Arbitration module 104 finally replaces the last unresolved digit of the address with a "0", resulting in a YY identifier of [0000]. Since this YY identifier matches the YY identifier of processor U-0, it therefore has access to the resource. Implementation of Arbitration Module 104 Let PP<i> denote the ith digit of a YY identifier output of arbitration module 104 and YY<i> denote the ith digit of a YY identifier input into arbitration module 104. Then, for the elimination algorithm used in this embodiment, an output bit PP<i> of the arbitration module 104 is governed by the following logic equations: PP<3> = 0 if -START*((YY<3>=0 + YY<3> = X)) PP<i> = 0 if -START*((YY<i>=0) + (YY<i>=X)*(YY<3>≠X) *...*(YY<i+1>≠X)) for i≠3 PP<i> = 1 if -START*(YY<i>=1) PP<i> = X otherwise. The START signal is included in the above equations so that all PP bits are set to [X] when the START signal is active. If P<i> and Q<i> code digit PP<i> according to Table 1, B<i> is used to represent the combined result of all ith true address input bits, and C<i> is used to represent the combined result of all ith complemented address input bits, the above equations can further be reduced to those shown in Table 3. For each i=0,...,3 signal P<i>, which is generated by the arbitration module, and signal B<i>, which is the wired OR of the signals Bj<i> generated by the request modules, share the same line of common bus 100. This accounts for four lines of common bus 100. Similarly, for each i=1,...,3 signals Q<i> and C<i> share the same line of common bus 100. This accounts for the other four lines of common bus 100. The use of the common bus is time multiplexed between the arbitration module and the request modules by means of signals A and R, which are generated by the timing generator 111. As illustrated in Fig. 2, the arbitration module 104 is implemented with a programmable array logic 200, such as Part No. PAL20R8 marketed by Monolithic Memories. The equations in Table 3 are used to program the programmable array logic 200. Also as illustrated in Fig. 2, the inputs to the programmable array logic 200 comprise data from common bus 100 which, for the purpose of arbitration, consist of address bits B<0> through B<3> and address bits C<0> through C<3>. As is common practice, the ORing of signals Bj<i> and Cj<i> is implemented as a wired OR (i.e. in negative logic). Consequently, in this implementation: YY<i> = [0] if voltage of B<i> is LOW and voltage of C<i> is HIGH, YY<i> = [1] if voltage of B<i> is HIGH and voltage of C<i> is LOW, and YY<i> = [X] if voltage of B<i> is LOW and voltage of C<i> is LOW. Thus, YY<i> ≠ X if voltage of B<i> is HIGH or voltage of C<i> is HIGH. Consequently, signal YY1NEX is generated by ORing inputs B<1> and C<1> with an OR gate 201. Similarly, input signal YY2NEX is generated by ORing inputs B<2> and C<2> with an OR gate 202. Finally, input signal YY3NEX is generated by ORing B<3> and C<3> with an OR gate 203. The programmable array logic 200 is clocked by signal 107 generated by module 111. Inside the programmable array logic 200, the inputs are logically combined according to the equations given in Table 3 to produce outputs -P<0>, -P<1>, -P<2>, -P<3>, -Q<0>, -Q<1>, -Q<2>, and -Q<3>. Each of these signals is fed into one side of a respective NAND gate 204 to 211 which has an open collector output. Each output from NAND gates 204 through 211 drives a corresponding bit of common bus 100. Implementation of Request Module 103 By way of example, a request module 103-13 for processor U-13 (binary address 1101) may be as illustrated in Fig. 3. It comprises a programmable array logic 300, such as Part No. PAL16R4 marketed by Monolithic Memories. The identity of the processor is set in each request module by connecting one side of each respective NAND date 301 through 308 as shown. Each open collector output of NAND gates 301 through 308 drives a corresponding bit of common bus 100 and computes a wired OR of all the equally significant output bits from other processors. The identity bits of gates 301 through 308 are enabled onto common bus 100, unless signal INH-13 is active (active low). As described above, if the ASK-13 signal is activated by processor U-13, request module 103 would enable its address onto bus 100 during a designated response time, unless there is a mismatch between the YY identifier of the processor and the YY identifier sent by arbitration module 104. If MMT-13 represents the mismatch condition for processor U-13, and if R represents the designated response time, INH-13 signal must then follow the logic equation of: The mismatch condition MMT-13 for processor U-13 can be implemented in the programmable array logic 300 using the following logic equation: When the YY identifier sent by the arbitration module exactly matches the YY identifier of request module of processor U-13, a GRT-13 signal is sent to processor U-13 to indicate that it has access to the common resource 102. The GRT-13 signal of processor U-13 is implemented in the programmable array logic 300 using the following logic equation: Implementation of System Timing Generator 111 Arbitration module 104 and request modules 103-0 through 103-15 are clocked by timing signals generated by system timing generator 111. A timing diagram of the clock signals is shown in Fig. 4. As illustrated in Fig. 5, system timing generator 111 comprises a counter 400, which counts the system clock signal 401 to give a 4-bit output d0 to d2. These outputs are then used by a programmable array logic 402 to generate signals 107 to 110 in accordance with the following equations: States Determination If central processor 101 wants to know the specific states (e.g. whether a processor has a program check) of a subset of processors (say, processors 0010, 0100, and 0110), it can address the subset with a YY identifier of [0XX0] by putting a true address P of 0110 and a complement address of 1111 onto common bus 100. Upon receipt of the central processor's request, an addressed processor with a program check responds by sending its true and complemented addresses to the central processor 101. For example, if processors with addresses 0010, 0100, and 0110 have a program check, then these processors would send their true addresses (0010, 0100, and 0110) and their complemented addresses (1101, 1011, and 1001) to central processor 101. One address received by the central processor 101 (i.e. the ORed result of all the true address bits) is thus 0110. The second address received by the central processor 101 (i.e. the ORed result of all the complement address bits) is 1111. From Table 2, the resultant YY bits are thus YY=[0XX0]. Generally, one of the following results can be received by the central processor 101: (a) If YY=[all E], then no processor has a program check; (b) If YY=[0's and 1's], then only one processor has a program check; or (c) If YY=[0's, 1's, and X's], and if the number of X's is k, then at least 2 and at most 2**k processors have a program check. Using the received YY identifier and by iteratively narrowing the subset of processors, the central processor 101 can identify a processor within k-1 iterations. For example, central processor 101 can, as a next step, put YY=[0X00] on bus 100. Now, because only processors 0100 and 0110 are addressed, they respond by sending their true (0100 and 0110) and complement (1011 and 1001) addresses. Central processor 101 then receives a first address of 0110 (the ORed result of 0100 and 0110) and a second address of 1011 (the ORed result of 1011 and 1001), which is a YY identifier of [01X0]. Since there is only one "X" in the YY address, the identities of the two processors (0100 and 0110) which have a program check are readily known. Similarly, by sending the true and complement addresses in which the YY identifier is [00X0], central processor 101 would receive a response of YY=[0010], indicating that processor 0010 has a program check.

Claims: 1. A method of arbitrating access to a shared resource among a plurality of uniquely identified processors, comprising a) forming a first m-digit word by logically combining identifiers of a subset of processors requesting access to the common resource, b) forming a second m-digit word by logically combining the complements of the identifiers in step a), characterized by c) combining in a predetermined manner said first and second words to form an m-digit identifier word designating the subset of processors requesting access, by creating ambiguous position values in said identifier word, d) eliminating one ambiguous position value from said identifier word in order to restrict the subset, and e) repeating steps a)-d) until only one requesting processor is designated. 2. Method as claimed in claim 1, wherein the m-digit identifier word is generated at each bit position by substituting in each digit position thereof a value selected from the set consis­ ting of first and second values and an ambiguous term, said substitution term being governed according to the match or mismatch condition among pairs of bits of the first and second words of like digit significance, the subset size being a function of the position and the occurence of the ambiguous term in said identifier word. 3. Method as claimed in claim 2, wherein the step of eliminating an ambiguous position value in the identifier word is performed a central processor according to a dymamically changeable algorithm. 4. Method as claimed in any preceeding claim, wherein i) during the steps of designating a subset of requesting processors, the comparison match and the comparison mismatch conditions are of first and second kinds, ii) the comparison match condition of the first kind indicating a pair of matching binary "1"'s and of the second kind indicating a pair of matching binary "0"'s, the match occuring in digit positions of like significance in the first and second words, and iii) the comparison mismatch of the first kind indicating a binary "1" in a digit position of the first word and a binary "0" in a digit position of like signifcance in the second word, the values of the digit positions during a mismatch condition of the second kind being reversed.

Inventors: AUERBACH, DANIEL JONATHAN, CHEN, TIEN CHI, PAUL, WOLFGANG JACOB
Applicants: INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1986
Main classification: G06F13
IPC codes: G06F13, G06F15