Abstract:
A multiple request toggling (MRT) arbitration system for prioritizing requests to a set of shared resources by multiple requestors, especially requests by multiple processors to shared resources in a multiprocessor system. The MRT arbitration system assigns priority to multiple requests on a first-come, first-serve basis with the priority of multiple simultaneous requests being resolved through an arbitration network.

Description:
RELATED APPLICATION 
     This application is a continuation-in-part of an application filed in the United States Patent and Trademark Office on Dec. 29, 1989, entitled CLUSTER ARCHITECTURE FOR A HIGHLY PARALLEL SCALAR/VECTOR MULTIPROCESSOR SYSTEM, Ser. No. 07/459,083, and assigned to the assignee of the present invention, which is hereby incorporated by reference in the present application. 
    
    
     TECHNICAL FIELD 
     This invention relates generally to the field of logical priority decision mechanisms for use in computer and electronic logic systems. More particularly, the present invention relates to a method and apparatus for prioritizing requests to multiple shared resources by multiple requestors, especially requests by multiple processors to common shared resources in a multiprocessor system. 
     BACKGROUND ART 
     In an effort to increase the processing speed and flexibility of supercomputers, the cluster architecture for highly parallel multiprocessors described in the previously identified parent application, Ser. No. 07/459,083, provides an architecture for supercomputers wherein multiple of processors and external interfaces can make multiple and simultaneous requests to a common set of shared hardware resources, such as main memory, global registers or interrupt mechanisms. 
     One of the important limitations in designing such a cluster architecture is providing a fair and efficient method and apparatus for prioritizing requests to multiple shared resources by multiple requestors, in this case requests by multiple processors to common shared resources in a highly parallel multiprocessor system. Prior art methods and systems for determining the priority among multiple competing requestors to common shared resources are inadequate to meet the needs of such a cluster architecture. 
     It is recognized that a computer or electronic logic system which communicates with a shared resource requires a switching network. This implies that conflicts can occur when multiple requestors are attempting to simultaneously access the shared resource. Consequently, some type of arbitration algorithm must be employed to determine which requestor is to be granted access to the destination resource having conflicting requests. A fair and efficient system must satisfy at least the following goals: (1) any free resource will always receive a grant if there is at least one valid request attempting to access it; (2) relative time ordering of requests is maintained (i.e., access is granted on a first come first serve basis); (3) equal access to all resources is provided for each requestor (i.e., &#34;fairness&#34; is ensured when arbitrating among requestors); (4) wait time during requestor conflicts is minimized; and (5) arbitration control decision time is minimized. 
     Although several types of arbitration algorithms exist in the prior art, the traditional prior art arbitration algorithms are not effective at meeting these goals. Two of the more common prior art arbitration algorithms are the Round Robin and the Priority Ring. 
     Round Robin is a prior art technique that gives each requestor an opportunity to be the highest priority. This opportunity is given to each requestor, one at a time through a rotating mechanism. The problem associated with this is that a requestor&#39;s priority is unrelated to when the request is actually made. In other words, the requestor might have been rotated to lowest priority just prior to the request. Thus, subsequent requests are serviced prior to the original one. This fails to satisfy goals 2 and 4 set forth above. 
     A Priority Ring is another prior art arbitration technique. This scheme gathers requests made over a given time period into a group or &#34;ring&#34;. At the end of the time period, the ring is closed and all requests that have been stored in this ring are processed according to a fixed priority resolution mechanism. While the requests that were gathered into the first ring are processed, subsequent requests are gathered into a new ring. When all of the requests in the first ring have been processed, the second ring is closed, and the first ring is free to accept new requests. The problem associated with this technique is that a given requestor always has a fixed priority relative to the other requestors within each ring. Thus, the algorithm favors certain requests over others and it allows later requests to be granted before previous ungranted requests, thereby failing to satisfy goals 2, 3 and 4 set forth above. 
     Because of the inherent limitations of the present methods and systems for determining the priority among multiple competing requestors to common shared resources, it is not possible to fairly and efficiently prioritize such requests in a manner that allows for requestors to be serviced on a first-come, first-served basis. Therefore, a new method and apparatus for a multiple request toggling priority system is needed that provides for a fair and efficient prioritization of multiple simultaneous requests in a single clock cycle. 
     SUMMARY OF THE INVENTION 
     The present invention provides a method and apparatus for a multiple request toggling priority system that allows fair and efficient arbitration of simultaneous multiple requests to common shared resources. The present invention achieves this objective by the symmetry and balance of the design of the toggling priority system. All requestors are arbitrated in a distributed and democratic fashion. The present invention assigns priority to multiple requests on a first-come, first-serve basis with the priority of multiple simultaneous requests being resolved on the basis of a toggling system. 
     The Multiple Requestor Toggling (MRT) priority system of the present invention is capable of using a simple boolean algorithm to control a variety of switching mechanisms. The MRT priority scheme is applicable to any system where multiple requestors communicate with a commonly shared resource requiring an arbitration network to resolve simultaneous conflicting requests to that resource. In this case, resolution of conflicts refers to the determination of the order in which requests for access to the common resource are serviced. The MRT priority system of the present invention is also useful for determining access to multiple shared resources. In this case, part of the MRT priority system, the inhibit matrix, is associated with each one of the multiple shared resources and a plurality of these inhibit matrices are connected to each of the requestors. Each of these parts per shared resource are connected to a common part, the relative priority state storage means, which maintains the priority of each requestor relative to the others for all shared resources. 
     The MRT priority system can be used to control a wide range of switching applications. The switching mechanism can be embodied in any network topology, such as a Ring, an N-cube, a Near Neighbor or a Fully Interconnected Crossbar. The MRT algorithm can be employed in any level of a hierarchical switching network. The switch itself can be implemented using any logical steering circuit such as a simple multiplexer or other similar mechanisms. 
     In the preferred embodiment of the present invention, the MRT algorithm is implemented in a synchronous, sequential environment where the arbitration sampling interval is one system time period (e.g., a clock cycle). The MRT algorithm is an effective way of accomplishing the goals for an arbitration algorithm as set forth above. In the preferred embodiment, the present invention is implemented with relatively simple circuitry and in practice is an extremely efficient solution for determining which requestor(s) will receive a grant during any sampling interval. In addition, the MRT algorithm optionally provides the capability of producing a grant per resource per time period when used in multiple requestor/multiple resource applications. The grants per requestor can also be encoded to form multiplexer select inputs used to steer a data switch mechanism implemented using multiplexers. 
     Although the present invention may be used in many situations where arbitration among multiple requestors is necessary, the present invention is a particularly important ingredient in the design of highly parallel computer processing systems. In the preferred embodiment of the highly parallel computer processing system utilizing the present invention, each multiprocessor cluster includes shared resources for storing and retrieving data and control information, a plurality of tightly-coupled, high-speed processors capable of both vector and scalar parallel processing and a plurality of distributed external interfaces that allow for the transfer of data and control information between the shared resources and one or more external data sources. All of the processors and external interfaces in the cluster are symmetrically interfaced to the shared resources, both intra-cluster and inter-cluster, through a plurality of arbitration nodes that utilize the MRT priority system of the present invention. At least two processors and two external interface means are connected to each arbitration node. For inter-cluster access, a remote cluster adapter associated with each cluster and also having the MRT priority system of the present invention is operably connected to remote cluster adapters in all other clusters. The remote cluster adapter allows the arbitration nodes in one cluster to access the shared resources of all other clusters, and also allows all other clusters to access the shared resources within this cluster. 
     The shared resources of the preferred embodiment include a shared main memory, a shared group of global registers and a shared interrupt mechanism. Access to the shared resources is equivalent and symmetric across all processors and external interfaces. This is true even if the processors and external interfaces are connected to the same arbitration node, to different arbitration nodes in the same cluster, or to arbitration nodes in different clusters. The need for job optimization which would otherwise be required in order to accommodate a particular memory-hierarchy is minimized by the symmetry of access to shared resources accomplished by use of the MRT priority system of the present invention. 
     An objective of the present invention is to provide a method and apparatus for a multiple request toggling priority system that allows for a fair and efficient prioritization of multiple simultaneous requests in a single clock cycle. 
     Another objective of the present invention is to provide a method and apparatus for a multiple request toggling system algorithm that grants any access that can be granted to the requestor. 
     A further objective of the present invention is to provide a method and apparatus for a multiple request toggling priority system algorithm that maintains the relative time ordering of the requests. 
     An additional objective of the present invention is to provide a method and apparatus for a multiple request toggling priority system algorithm that provides equal access to all requestors. 
     Still another objective of the present invention is to provide a method and apparatus for a multiple request toggling system algorithm that minimizes the wait time during conflicts for requestors. 
     Still another objective of the present invention is to provide a method and apparatus for a multiple request toggling priority system algorithm that minimizes the control decision time for requestors. 
     These and other objectives of the present invention will become apparent with reference to the drawings, the detailed description of the preferred embodiment and the appended claims. 
    
    
     DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of an arbitration network showing an MRT arbitration algorithm. 
     FIGS. 2, 2a and 2b are detailed circuit diagram for the MRT inhibit matrix shown in FIG. 1. 
     FIGS. 3a and 3b are more detailed circuit diagrams of the MRT relative priority state update logic and the relative priority state storage means shown in FIGS. 1 and 2. 
     FIG. 4 is a state diagram representation of a relative priority state storage means for a four requestor MRT system of the present invention. 
     FIGS. 5a, 5b, 5c, and 5d are state diagram tables for the four requestor MRT system shown in FIG. 4. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Referring now to FIG. 1, the method and mechanism of the MRT arbitration algorithm will be described. In the preferred embodiment, the MRT arbitration system comprises a plurality of request queues 10, relative priority state update logic 11, a relative priority state storage means 12, and one or more inhibit matrices 13. 
     The input to the MRT arbitration system is a set of request queues 10, one per requestor. The input request queues 10 store the incoming requests including any information necessary to make the arbitration decision, such as the address of the destination resource which is useful in identifying the resource being requested, as well as checking to see if any reserved resources are busy. In the preferred embodiment of the invention, each request queue 10 operates as a First-In-First-Out (FIFO) queue structure. A request queue 10 is loaded when a requestor has an operation ready for arbitration, and it is unloaded when the MRT algorithm generates a grant 14 for that requestor. The outputs of the request queue 10 are used to drive both the relative priority state update logic 11 and the inhibit matrix 13. 
     The MRT algorithm maintains a relative priority state storage means 12 which stores the relative priority state of every requestor relative to every other requestor. Each cell or bit in the relative priority state storage means 12 represents the relative priority of two requestors. This cell indicates which of the requestors will be granted access in the case of simultaneous resource requests. Each of the cells of the relative priority state storage means 12 are connected to the inhibit matrix 13. 
     When the MRT algorithm is used to control access to a single resource, each cell in the relative priority state storage means 12 drives two gates in the inhibit matrix 13 for that destination. One gate represents requestor x inhibiting requestor y if x is higher priority, while the other gate represents requestor y inhibiting requestor x if y is highest. 
     When the MRT algorithm is used in a multiple destination resource application, one relative priority state storage means 12 can be connected by means of fanout logic 17 to drive all inhibit matrices 13 (one per destination). In this case, the relative priority state update logic 11 is sufficient to ensure &#34;statistical fairness&#34; for all requestors (although more than one relative priority state storage means 12 could be used). Furthermore, for N requestors, the relative priority state storage means 12 can be thought of as an N by N triangular matrix, minus the diagonal (there is no relative priority between a requestor and itself). For a given number of N requestors, the number of cells required in the relative priority state storage means 12 is (N*(N-1))/2. 
     Referring now to FIGS. 2a and 2b the inhibit matrix 13 will be described. The inhibit matrix 13 is a combinational logic network. There is one matrix per resource. It accepts inputs from the request queues 10 and the relative priority state storage means 12. First, the inhibit matrix 13 examines the outputs of the request queues 10, searching for a request that decodes to the resource for which this matrix is arbitrating. Once a valid request is established from a specific requestor for this resource (and any reserved resource check for this destination indicates that the resource is available) an arbitration enable condition exists for this requestor. 
     It will be recognized that a distinction may exist between a resource being arbitrated for and a reserved resource. A given resource being arbitrated for may have one or more reserved resources associated with it. The MRT arbitration system may, optionally, include a qualification step that checks the arbitration request to see if it is attempting to access a reserved resource. The result of this qualification can be used to validate the operation being presented to the MRT arbitration system. Thus, reserved resources can have a busy time associated with them that prevents new requests from overrunning previously granted requests. When a reserved resource is busy, that reserved resource will not prevent requests for other resources from being granted. In this sense, the MRT arbitration system can be used to multiplex multiple resources that are only accessible through a single destination path. For example, in the event that each of a number of resources associated with a destination path has a queue for holding arbitrated requests and the queue for one of the resources becomes full, the reserved resource qualification step prevents additional requests from overrunning the one queue, while still allowing other requests to be routed to other open queues associated with the single destination path. This amounts to a pre-processing check on the ultimate availability of one of a plurality of resources associated with a single destination path prior to the time that the request is actually arbitrated. As a result, the pipelines or queues involved in the arbitration can be continually filled and a bubble in the pipeline is not created by arbitrating for a request that cannot be serviced, for example, because of a full queue. 
     For N requestors the inhibit matrix 13 is organized as a full N×N matrix. The arbitration enables for each requestor form the rows of the matrix, while the columns represent an inhibit condition for each requestor. The inhibit matrix 13 has the property that a requestor of higher priority disables a requestor of lower priority. Therefore, the requestor with the highest priority is the only one enabled to receive a grant 14 (per column). Each row/column intersection in the inhibit matrix 13 corresponds to a specific requestor inhibiting another requestor from obtaining a grant 14. The logic at each intersection point interrogates the relative priority state bit corresponding to the appropriate pair of requestors. 
     Grants 14 for each requestor are generated by logic that detects no inhibits in a column. If the requestor in a given row has an arbitration enable condition and is currently higher priority than another requestor in a given column, an &#34;inhibit&#34; will occur such that the logic constituting this column will not generate a grant 14 for the latter requestor during this sampling interval. Because the value of the relative priority state storage means completely described the priority hierarchy at all times, the highest priority requestor with a valid arbitration enable will be the only one able to obtain a grant per inhibit matrix 13 (i.e., per resource) each interval. 
     Referring now to FIGS. 3a and 3b, the relative priority state update logic 11 and the relative priority state cell 18 will be discussed. The relative priority state update logic 11 exists at the input to the relative priority state storage means 12. It accepts as input, requests from the request queues 10 and grants 14 out of the inhibit matrix 13. The relative priority state update logic 11 is entirely combinational and its function is to determine when to modify or update the bits in relative priority state storage means 12. The purpose of the relative priority state update logic 11 is to modify the relative priority cells associated with a given requestor, such that the requestor becomes lowest priority. This action is performed so that any previous request dynamically rises in priority relative to the new one. Each cell in the relative priority state storage means 12 consists of a set/reset circuit which stores the relative priority between two requestors. There are two inputs to each cell 18. One input sets requestor x to lowest priority, and the other sets requestor y to lowest priority. If both inputs are true, the state of the cell toggles. If neither input is true, the cell remains unchanged. When it is necessary for the algorithm to set a requestor to lowest priority, the inputs of all cells corresponding to that requestor are enabled. These are the cells which define the priority of that requestor relative to each of the others. When two requestors both need to be set to lowest priority, the relative priority state update logic 11 toggles the relative priority cell 18 for that pair of requestors. This results in one requestor being higher priority than the other, but no bias exists towards favoring one priority state over the other. This toggling function is the mechanism which implements the &#34;fairness&#34; feature of the MRT algorithm. 
     Because one of the goals of an arbitration system is to minimize the control decision time, the preferred embodiment of the MRT algorithm uses an &#34;anticipatory&#34; update function to maintain the relative priority state. In other words, the relative priority state has already been &#34;updated&#34; at the time a request arrives. This is accomplished by allowing the update to occur even when the request queue is empty. In essence, the update function is always occurring while the request queues are empty, such that all inactive requestors are continuously attempting to set themselves to lowest priority, thereby toggling their appropriate relative priority bits. An update to the state storage means 12 is generated whenever an access is granted 14 or whenever the associated request queue 10 is empty. When the relative priority state update logic 11 detects a valid request at the output of a request queue 10 (thus the queue is not empty), the state update logic 10 stops updating state matrix 12, allowing the relative priority of the requestor to dynamically rise until a grant 14 is given. Thus, in its simplest form, the update function is a logical &#34;OR&#34; of request queue empty or grant (see FIG. 3a). This is an important feature for time critical applications of the MRT algorithm of the present invention. 
     One characteristic of the MRT algorithm is that the priority state is modified based on when requests appear. Because the priority state reflects the relative age of the requests, giving older requests higher priority than newer requests, the priority state dictates the order in which the requests are granted. Thus, the MRT algorithm maintains relative time ordering of the requests as seen at the outputs of the request queues 10. This characteristic effectively minimizes the wait time when conflicts exist because newer requests cannot be granted before older requests. The longest a request ever has to wait is strictly a function of how many ungranted requests have been presented prior to this one. 
     Another characteristic of the present invention is that internal feedback is used (in the form of a grant per requestor 14) to modify the relative priority state 12 and unload the request queues 10. The grant 14 sets the requestor to lowest priority in anticipation of a new request and advances the request queue 10 to the next item. The queue may or may not contain another request. If a request is present, it will be arbitrated against other requests as the lowest priority. As long as any pending requests are accessing different resources and their associated reserved resources are not busy, all requests can be granted. Thus, the MRT arbitration system has the ability to generate grants 14 for the same (or different) requestor(s) every cycle. This accomplishes the goal of granting any access that can be granted. 
     When the MRT algorithm is used in a multiple resource application, the set of requestors competing for one of the resources is a subset of all the requestors that are ordered in the relative priority matrix. Therefore, this subset is also ordered in relative priority. Because the relative priority state 12 reflects the relative age of the requests, the priority state has no bias towards favoring any particular priority assignment, and fairness is ensured within the subset. 
     The MRT arbitration system, when used with multiple inhibit matrices 13 (for multiple resources) internally generates a grant per requestor for each inhibit matrix 13. Thus, the algorithm maintains a grant per requestor, per resource 15. Since these grants are generated in both forms by the algorithm, they can be combined in either dimension to not only generate grants per requestor 14, but grants per destination 15. This can be extremely useful in certain applications such as initiating references to banks of memory. 
     Referring again to FIG. 1, an optional output encoder 19 can be included in the MRT arbitration system which takes the grants per requestor and encodes them for each resource. This is very useful when controlling a switch mechanism implemented using multiplexers (per destination resource) which select each of the requestors. Because the MRT system only grants one requestor per destination 15 each cycle, the algorithm guarantees that the grants per requestor 14 are mutually exclusive. This allows the output encoder 19 to be implemented as a simple encoder function, as opposed to a priority encoder which is more complex. 
     Referring now to FIG. 4, an example of a four requestor MRT system of the preferred embodiment will be described. It can be seen that in order to maintain the relative priority among four requestors of equal priority, it is necessary to store information on six conditons or states that identify the relative priority of each of the six possible combinations of priority pairs, e.g., Req 0&#39;s priority with respect to Req 1, Req 0&#39;s priority with respect to Req 2. etc. In the MRT system of the present invention, the state of each priority pair is stored as a single bit that represents the requestor&#39;s relative priority with respect to one specific other requestor. Because a requestor is either higher or lower priority than any other requestor, one state (one cell) is sufficient to represent each priority pair. Thus, for N requestors, it is possible to represent the number of relative priority states among all N requestors with (N*(N-1))/2 bits. 
     FIGS. 5a-5d show a relative state table for all of the priority pairs of the 4 requestor system shown in FIG. 4. In this system, each priority pair is represented by a single cell. The inputs to the relative state table are comprised of both a positive and negative representation of each requestor. When the update condition is true for a given requestor, the algorithm attempts to set all of the bits for that requestor to lowest priority, i.e., positive bits are set to &#34;0&#34; and negative bits are set to &#34;1&#34;. To &#34;read&#34; the relative state table as shown in FIG. 5a, each row is examined. In the initial state shown in FIG. 5a, row 0 shows Req 0 is lower than Req 1, Req 2 and Req 3. Row 1 shows that Req 1 is lower than Req 2 and Req 3. Row 2 shows that Req 2 is lower than Req 3. Thus, the priority pairs for all six states are represented in the relative state table. 
     Referring now to FIG. 5b, the relative state table is shown at Time 1 when Req 2 has an update condition. As can be seen, Req 2 modifies the relative state table in response to the update and is now the lowest priority requestor. Req 2 has set all of its positive states to &#34;0&#34; and all of its negative states to &#34;1&#34;. Reading row 0, Req 2 is lower than Req 0, but Req 0 is still lower than Req 3 and Req 1. Row 1 shows that Req 2 is lower than Req 1, but Req 1 is still lower than Req 3. Finally, row 2 shows that Req 2 is still lower than Req 3. Thus, Req 2 is set to the lowest priority and will be serviced if Req 0, Req 1 or Req 3 is not presently requesting access to the resource being arbitrated. 
     The relative state table is shown at Time 2 in FIG. 5c when new update conditions are active for both Req 1 and Req 3. Again, an attempt is made to set all of the cells associated with each requestor that has a valid update condition to the lowest priority. In row 0, both Req 1 and Req 3 are now lower than Req 0. Req 2 is still lower than Req 0 because the priority pair bit (0/2&#39;) remains in its previous condition, if no update condition exists for Req 0. The circled priority pair bit (1/3&#39;) illustrates the toggling case when two requestors collide (i.e., have simultaneous update conditions). In this case, Req 1 is higher than Req 3 and would be the requestor to be serviced first in the event that they are both contending for the same resource. 
     FIG. 5d shows the relative state matrix at Time 3. During Time 3, a new update condition exists from Req 0 which updates all of its priority pair bits. After all requestors have been serviced, and assuming that all input request queues are empty, the relative state matrix begins to toggle the priority state bits on each clock cycle until one or the other requestors &#34;freezes&#34; the state with a new valid request. This toggling insures that if simultaneous requests from any two requestors are receive again, both requestors have an equal chance of being set to the higher priority in the priority pair bit of the relative state matrix. 
     It will be noted that in the MRT system shown in FIGS. 5a-5d, a maximum delay of four cycles can occur if all four requestors have valid requests to the same resource during the same cycle (assuming no reserved resource busy time). 
     In summary, the MRT algorithm meets all of the specified goals listed above. It is superior to prior art techniques in performance. It is easily implementable in simple circuitry. It provides the ability to generate the grant result in several forms, and is adaptable to a wide range of switching arbitration control applications. 
     Although the description of the preferred embodiment has been presented, it is contemplated that various changes could be made without deviating from the spirit of the present invention. Accordingly, it is intended that the scope of the present invention be dictated by the appended claims rather than by the description of the preferred embodiment.