Apparatus for avoiding processor deadlock in a multiprocessor system

Abstract: A multiprocessor system includes a number of system processors which tightly couple to a system bus to share a main or system memory and a number of on-board memory processors which also are tightly coupled to the system bus. Each processor has a high performance microprocessor which tightly couples to an on-board or local memory through the microprocessor's local bus. System memory is accessible using a memory lock protocol while the local memory is accessible through a bus lock protocol. Each on-board memory processor includes a lock mechanism which enables the processing of memory lock commands directed to its local memory received via the system bus from any other processor and for issuing memory lock commands to system memory.

Description: RELATED APPLICATIONS 1. The patent application of James W. Keeley and Thomas F. Joyce entitled, "High Performance Tightly Coupled Multiple Synchronous State Machine Based Processing Unit," filed on October 4, 1991, bearing serial number US-A-5 341 508, which is assigned to the same assignee as this patent application. 2. The patent application of James W. Keeley entitled, "Bus Interface State Machines," filed on October 4, 1991, bearing serial number US-A-5 471 638, which is assigned to the same assignee as this patent application. 3. The patent application of Thomas F. Joyce and James W. Keeley entitled, "Programmable Bus State Machine," filed on October 4, 1991, bearing serial number US-A-5 341 495, which is assigned to the same assignee as this patent application. BACKGROUND OF THE INVENTION Field of Use The present invention relates generally to multiprocessor systems and, more particularly, to deadlock detection apparatus for avoiding deadly embrace situations between the processing units within a multiprocessing system. Prior Art In computer systems, it is important that resources be allocated in a way that deadlock does not occur. A deadlock occurs when processes holding some resources request access to resources held by other processes in the same set. Unless the deadlock is resolved, all the processes involved are blocked indefinitely. Therefore, a deadlock requires the attention of a process outside those involved in the deadlock for its detection and resolution. Generally, a deadlock can be resolved by aborting one cr more processes involved in the deadlock and granting the released resources to other processes involved in the deadlock. A process is aborted by withdrawing all its resource requests, restoring its state to an appropriate previous state, relinquishing all the resources it acquired after that state, and restoring all the relinquished resources to their original states. The European patent application EP-A-0 369 264 which is assigned to Bull HN Information Systems Italia S.p.A. discloses the sharing of resources and deadlock prevention in a data processing multiprocessor system comprising the components listed in the preamble of claim 1. The apparatus of the subject application is an advanced development and improvement over the prior art Bull HN Italia system. Therein, each system processor is provided with at least a local memory to which it gets access through a local bus. An interface unit connects the local bus to a system bus. Each of the system processors may have access to the local memory of another processor through its own local bus, its own interface unit, the system bus and the local bus of the other processor. Deadlock is prevented by providing a bypass unit of the interface unit for enabling access from the system bus to the local bus through the bypass unit. A buffer block for transfer requests is connected between the local bus and the interface unit for latching system bus access requests which are received from an agent processor on the local bus. A circuit block is provided for isolation of the agent processor outputs from the local bus so that each agent processor may post read/write operations in the related latching block for latching bus access requests and thereafter release its own local bus without awaiting completion of the operation. Herein the local bus is available to receive access requests received from the system bus through the bypass unit. The operation pending in the latching block is completed, in the case of a read operation, by reconnecting the agent processor and the latching block to the local bus. U.S. Patent No. 4,318,182 discloses a system in which a deadlock detection mechanism detects situations where two or more processes are waiting for related events which cannot happen, preventing a requesting process from waiting for the availability of a resource or resources which are already held by a second process which is waiting directly or indirectly upon the first process. This requires that the system have access to all of the resources within the system to ensure that a requested resource is not currently assigned to a second process which is already waiting directly or indirectly for a second resource currently assigned to a first process. In tightly coupled multiprocessor systems, the different processors are required to share data within a common or global main memory system. To preclude race conditions and the occurrence of the deadlock or deadly embrace situation, it is well known to have each processor use test and set lock instructions. That is, each processor obtains or tests the lock for a shared data structure or section of main memory. If it is unlocked, the processor gets the lock and accesses the segment. However, if the segment is locked, the processor spins in a loop, periodically testing until the lock becomes available. While the above type of mutually exclusive protocol has been effective in eliminating the above problems, this approach may not be effective in certain types of situations which may not be easily detected. For example, this type of situation may go undetected in a multiprocessor system which includes processors with local memories where the local memories of such processors are required to be shared by other processors of the system. Accordingly, it is a primary object of the present invention to provide a multiprocessor lock mechanism which reliably protects against deadlocks. It is a more specific object of the present invention to provide a multiprocessor lock protocol which permits reliable accesses to all processor shared memories within a tightly coupled multiprocessor system. SUMMARY OF THE INVENTION The above and other objects of the present invention are solved in an advantageous manner basically by applying the features laid down in the characterizing portion of the independent claim 1. Further enhancements, features and aspects of the invention are defined in the associated dependent claims. Briefly, a multiprocessor system includes a number of system processors which tightly couple to a system bus to share a main system memory and a number of peer processors which also are tightly coupled to the system bus. Each peer processor has a high performance microprocessor which tightly couples to an on-board local memory through the microprocessor's local bus. System memory is accessible using a memory lock protocol while the local memory is accessible through a bus lock protocol. Each processor has a system interface which includes circuits for implementing the memory lock protocol for accessing system memory. According to the present invention, each peer processor includes a lock mechanism which enables the processing of memory lock commands directed to its local memory received via the system bus from any other processor and for issuing memory lock commands to system memory. In the first case, when a processor issues a memory lock command on the system bus to a local memory of the peer processor, the lock mechanism included as part of the system bus interface circuits effectively locks the on-board local memory and prevents the microprocessor from accessing the local bus through the use of its local bus standard hold acknowledge mechanism. This allows the local memory to read out and transfer requested data to the system bus. The local memory maintains control of the microprocessor local bus until the entire memory lock protocol sequence is deemed completed. That is, until the data is delivered to the requesting processor and it receives a next memory write clear command from the system bus. At that time, the lock mechanism unlocks the local memory, transfers the write command to the local memory for writing the data into the specified location, completing the sequence. All further memory lock commands received from the system bus are refused by the peer processor during the time the local memory is locked thereby ensuring proper operation. Also, this enables the use of different types of system bus protocols, such as a split bus cycle protocol. In the second case, when the peer processor's microprocessor issues a memory read lock command to an "off-board" memory (i.e., to another peer processor's local memory or to the system memory), the system interface circuits convert the command into the appropriate memory read lock command sequence which it applies to the system bus. All subsequent read requests to the off-board memory are converted into normal system bus request cycles. The first write command issued by the peer processor to the off-board memory during the memory lock protocol sequence is assumed to be directed to the same memory lock region (i.e., word or double word) and is converted to a write clear system bus cycle. As discussed, when the command is accepted by the off-board memory, both lock mechanisms are cleared (i.e., the lock mechanism of the addressed memory lock region and the lock mechanism of the on-board memory). All subsequent memory read commands issued by the microprocessor to the system memory or other off-board memory during the memory lock sequence are converted to normal system bus read cycles. The system of the present invention through the use of such lock mechanisms is able to avoid the possibility of a deadlock situation. If a memory region is already locked, the microprocessor's wait state generator circuits can insert "waits" while the bus interface retry the operation until the memory region is unlocked. By maximizing the use of existing capabilities, the system is able to provide lock functionality with little additional circuits. Further, the system of the present invention enables tasks to be properly synchronized between processors relative to accessing memory resources, notwithstanding differences in the types of locking mechanisms utilized by such processors. The above objects and advantages of the present invention will be better understood from the following description when taken in connection with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a block diagram of a multiprocessor system which incorporates the locking mechanism of the present invention. Figure 2 shows in greater detail, one of the processors of Figure 1 which incorporates the locking mechanism of the present invention. Figure 3 shows in greater detail, the locking mechanism of Figure 2. Figure 4 shows in greater detail, the microprocessor of Figure 2. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT Description of Figure 1 Figure 1 shows a multiprocessor system 10 which includes a plurality of central processing units 10-2 through 10-6 and peer processors 12-2 and 12-4 which tightly couple in common to a system bus 16 and to a main memory or system memory 14. Each processor, as shown, includes a bus interface area which enables the unit to transmit or receive requests in the form of commands, interrupts, data or responses/status to another unit on system bus 16. In the preferred embodiment, the system bus 16 operates asynchronously and uses a split bus cycle protocol which provides higher performance by granting other units bus cycles during the period of time a unit is waiting for main memory to furnish data in response to an earlier request made by that unit. For further information regarding this type of bus interface and operation, reference may be made to U.S. Patent No. 3,997,896. Referring to Figure 1, it is seen that each peer processor 12-2 and 12-4 includes a microprocessor 12-20, a local memory 12-30 and interface buses which couple to the bus interface circuits of block 12-40 as shown. The microprocessor 12-20 and local memory 12-30 are tightly coupled through a local processor bus 12-25. The microprocessor 12-20 is a high performance 32-bit processor which operates at clock speeds of up to 33 MHz and in the preferred embodiment corresponds to an Intel 80486 chip. The Intel 80486 chip includes a microprocessor, a floating point math coprocessor, a memory cache controller and an 8K RAM cache unit. The principal processing function is performed by the microprocessor while complex processing functions, such as floating operations, are performed by the math coprocessor. The internal cache unit provides fast access to the data required for processing. In the preferred embodiment, peer processors 12-2 and 12-4 operate under the control of a UNIX operating system. In Figure 1, the processors 10-2 through 10-6 function as host processors. In the preferred embodiment, each processor takes the form of a Bull DPS6000 system which operates under the control of the Bull HVS proprietary operating system. In the system of Figure 1, each of the processors are organized to operate in an independent manner and have access to the full complement of system resources, such as input/output units, main memory and the like. Description of Figure 2 Figure 2 shows in greater detail, the on-board processor 12-2 of Figure 1. In the preferred embodiment, the microprocessor 12-20 and local memory 12-30, along with associated control circuits, in addition to clock generation circuits of block 12-22, are contained on a single daughter board as shown. The clock generator circuits of block 12-22 generate a single frequency clock signal CLKREF of 33 MHz which provides the fundamental timing and internal operating frequency for microprocessor 12-20, in addition to all of the other circuits which make up processor 12-2. The bus interface circuits, sets of command, address and data registers and state control circuits are contained on the mother board. These two boards make up the entire processor. In greater detail, the microprocessor 12-20 and local memory 12-30 are tightly coupled to the address, data and command control processor bus lines as shown. The circuits of block 12-24 are used to control the microprocessor's access to processor bus by the generation of a bus hold signal DBHOLD as a function of control signals generated by an external state machine (XSM) 12-66 included as part of the mother board. As explained herein, such control is used to implement lock functionality relative to accessing local memory 12-30 in response to external requests according to the teachings of the present invention. When processor 12-2 does not have an external memory lock operation in process (i.e., signal PTLOKFF is off), each external request received from system bus 16 to access local memory 12-30 which has been acknowledged by the system bus response logic circuits of block 12-90 is loaded into the corresponding receive data, address and command registers 12-42 through 12-46 in response to an enable signal CYCREQ generated by clock logic circuits, not shown. The address and command signals are converted into the appropriate form by address and command converter circuits of blocks 12-52 and 12-54 and stored in available registers of the two sets of queue registers of blocks 12-62 and 12-64, in response to signal CYFIFO. Thereafter, the stored address and command signals are applied to the processor bus via the driver circuits of blocks 12-72 and 12-74, in response to an enabling signal EADQTP. Additionally, the bus command signals are applied to the system bus response logic circuits of block 12-90. According to the present invention, these circuits include a lock flip-flop which stores an indication of having received a memory lock request from system bus 16 to access local memory 12-30. Any data associated with a request loaded into register 12-42 is reordered as required by the programmable array logic (PALs) of block 12-50 and stored into the appropriate one of the register of block 12-60. The different bytes of the data words are swapped from the so-called big endian format of the system bus to the little endian format utilized by microprocessor 12-20. This is accomplished by the byte swap circuits of block 12-70 which is implemented by the proper reordering of connector pin connections. The XSM state machine 12-66 generates the required control signals for executing external memory read and write requests. In response to an input signal RXHAVE, which indicates the receipt of a memory request, the XSM state machine 12-66 loads the request into one of the sets of registers of the two level queue. It also properly conditions the microprocessor control bus circuits of block 12-24 for enabling transfer of the memory request via signal EADQTP to local memory 12-30 via the local bus in the same form as those memory requests made by microprocessor 12-20. Also, the XSM state machine 12-66 generates the required signals for transferring local memory data to system bus 16 via data swap circuits 12-56 and a set of registers of an array 12-58. A processor state machine control block 12-80 controls the processing of transactions or requests initiated by microprocessor 12-20. As shown, commands generated by microprocessor 12-20 are applied to a microprocessor to bus command generator of block 12-82 which, in turn, generates the appropriate system bus command. The bus command is loaded into a processor command register 12-84, along with the appropriate address and data. The address and data are loaded into registers 12-86 and 12-88, respectively. This is all done in response to an enabling load signal PTDTLD generated by state machine 12-80 as a function of the state of processor lock control signal PTLOKFF which is applied as an input to generator 12-82 and to the system bus response circuits of block 12-90. Description of Figure 3 Figure 3 shows in greater detail, the system bus response logic circuits constructed, according to the present invention. As shown, the block 12-90 includes a memory lock flip-flop 12-901 which couples to system bus 16 and is set and cleared, in response to bus signals BSMREF, BSLOCK, BSMCLR and BSSHBC. Signal MMLKCK is used to clock the switching of flip-flop 12-901. The lock output signal LOCKFF is applied to a PAL circuit 12-902 together with bus signals BSMREF, BSLOCK and BSSHBC, in addition to processor lock signal PTLOKFF from system lock circuits 12-48. The PAL circuits 12-902 generate the required system bus response signals MMACKR through MMWAIT loaded into register 12-904 which are applied to system bus 16. Also, circuits 12-902 generate second half bus cycle acknowledgement signal CPSHBA which is inverted by circuit 12-906 and used for storing data received via system bus 16 from an off-board memory, during a system second half bus cycle. It also generates the signal MMLOCK which is used to generate clock signal MMLKCK. Description of Figure 4 Figure 4 shows in greater detail, the microprocessor 12-20 and the different interface signals. The interfaces are divided into sections which denote the different functions which do not necessarily correspond with the physical layout of the Intel 80486 chip. The address bus and bus control lines comprise the majority of the lines. The address lines are bidirectional for accommodating the cache bus snooping capability. The cache control section includes six pins for controlling the microprocessor's internal cache. The cache enable (KEN) input is most frequently used to disable areas of memory that cannot be cached. The address hold (AHOLD) and external address strobe (EADS) inputs allow an external device to present the microprocessor 12-20 with an address. If the address matches an address in the microprocessor's internal cache, the associated data is flagged as invalid. The flush (FLUSH) cache input is used to inform the microprocessor that the entire contents of its cache are invalid. The page write-through (PWT) and page cache-disable (PCD) output pins reflect the states of the page attribute bit settings in internal page table entry or page directory entry registers. They indicate caching control that software has exerted over logical memory pages. The bus control section includes thirteen pins for controlling the processor's bus. The bus request (BREQ) output signal indicates that the microprocessor needs the address/data bus. The backoff input (BOFF) enables an external device to take control of the entire address/data bus even within an active, yet incomplete cycle. The pseudo lock output signal (PLOCK) is used by the microprocessor to indicate that the transaction it is performing requires more than one bus cycle to complete. By contrast, the bus lock signal (LOCK) is used to signal a critical read-modify-write operation in which no other system element can examine the item being modified until the current operation is complete. The microprocessor will not allow a bus hold request (HOLD) to take place wherein another bus master can complete control of the bus. That is, the microprocessor will not generate a hold acknowledge signal (HLDA) in response to a bus hold request. The memory/input-output (M/IO), data/control (D/C), and write/read (W/R) signals are used to define the type of bus cycle being initiated. The address status output signal (ADS) indicates when these bus cycle definition signals and address signals are valid. The non-burst ready input signal (RDY) indicates that the current bus cycle is complete. The burst ready input signal (BRDY) and the burst last signal (BLAST) are used to carry out burst transfer operations. The burst ready signal indicates that the current cycle is complete and the system will continue data transfer in the next clock cycle, unless the signal BLAST is presented. The BLAST signal signifies that the burst transfer is complete. For further information regarding the use of these signals, reference may be made to the Intel publication entitled, "i486 MICROPROCESSOR," dated November, 1989, Order Number: 240440-002. DESCRIPTION OF OPERATION With reference to Figures 1 through 4, the operation of the preferred embodiment of the present invention will now be described. It will be appreciated that semaphores or shared data structures can reside in system memory 14 or in the local memory 12-30 of processor 12-2 or 12-4. The semaphore ensures that a shared resource such as an area of memory is properly accessed by the different processors of the system. In the system of the present invention, locking mechanisms are in place which provide for any combination of semaphores notwithstanding the different types of locking protocols being employed. External/Off Board Memory Requests It will be assumed that the microprocessor 12-2 issues a memory read lock command to perform a read-modify-write operation using the semaphore mechanism in system memory 14 represented by the shaded block in Figure 1. This results in microprocessor 12-2 of Figure 4 generating lock signal DBLOCK. This signal is applied to microprocessor generator 12-82. The generator 12-82 produces a system bus command as a function of signal PTLOKFF generated by system lock circuits 12-48. These circuits determine if processor 12-2 sent out a memory lock command which was acknowledged by any memory unit, including its own as explained herein. If such a command was received and acknowledged, then the processor lock command would not be issued to the system bus 16. Assuming that no such command was received, the system lock circuits 12-48 do not generate signal PTLOKFF. This enables state machine 12-80 to generate load signal PTDTLD which loads the command into register 12-84 along with the address into register 12-86. This causes a test and set lock bus cycle to be issued to system memory 14. More specifically, read, test and set lock commands are signalled by setting signal BSLOCK to a binary ONE state while signal BSSHBC is set to a binary ZERO state. The system bus command is processed in a conventional manner employing the standard memory lock protocol sequences. If the lock associated with the address bits OA through 22 is already set, the system memory will respond by forcing signal BSNAKR to a binary ONE. If processor 12-2 receives a WAIT or NAK response to the command, it will retry the operation. If the lock associated with address bits OA through 22 is not already set and the memory is not busy, the system memory will accept the command by forcing signal BSACKR to a binary ONE and then set the lock. Assuming that the system memory 14 acknowledges the command signaling its acceptance, the memory area is then locked. Also, in response to the microprocessor memory lock command, the generator (PAL) 12-82 forces signal CPLOCK to a binary ONE state. This causes the setting of system lock circuits 12-48 via the system bus 16 to record the occurrence of the lock command. This enables the microprocessor 12-20 to continue operating as it does normally. That is, it still can issue another read lock operation immediately and even to the same memory structure. However, the command generator 12-82 converts the read to a generic read operation to preclude the occurrence of a deadlock condition. The processor 12-2 continues its completion of the lock operation. During that time interval, any system lock command received by processor 12-2 from system bus 12 even through unrelated to the first command will be automatically ignored. That is, signal PTLOKFF from the system lock circuits 12-48 cause the PAL generator circuit 12-902 of Figure 3 to generate a negative acknowledgement (NAK) signal on system bus 16. When microprocessor 12-20 issues a first write request, the microprocessor to bus command generator 12-82 converts this request into a write-clear command. That is, a write and clear lock command is generated by forcing signals BSLOCK and BSSHBC to binary ONES. The command is loaded into the register 12-84 along with the associated address and data into registers 12-86 and 12-88 in response to load signal PTDTLD. When the write and clear lock command applied to system bus 16 is received and the system memory is not busy, it accepts the write and clear lock command by forcing signal BSACKR to a binary ONE and clears its memory lock for the addressed lock region. The write and clear lock command also resets the microprocessor's system lock circuits 12-48, forcing signals PTLOKFF to a binary ZERO state. By assuming that the microprocessor's first write request will be directed to same lock-region of memory (i.e., 16 word block), this ensures that no deadlock condition will arise. All subsequently issued microprocessor write requests during the lock operation are converted into normal system write bus cycles. On-Board Memory Requests The present invention enables access to the microprocessor's local memory 12-30 by system bus requests issued by any one of the processors of Figure 1. It is assumed that one of the processors (e.g. processor 10-6) issues a memory read lock command to processor 12-2 to perform a read-modify-write operation using the semaphore mechanism in local memory 12-30 represented by the shaded block in Figure 1. This results in processor 10-6 issuing a memory read lock request to system bus 16. The command, address, and data signals of the memory request are loaded into registers 12-42 through 12-46 in response to signal CYCREQ. As previously discussed, this results in the on-board memory lock flip-flop 12-901 being switched on which forces signal LOCKFF to a binary ONE. The bus command signals are converted into the corresponding microprocessor bus lock command by the circuits of block 12-54 and loaded into one of the queue registers 12-64. Also, the bus lock signal RXLOCK stored in the queue command register is applied as input signal XBLOCK to the XSM state machine 12-66, along with certain subcommand control signals derived from decoding the converted command signals stored in queue register 12-64. The XSM state machine 12-66 generates lock hold signal LOCKHOLD which is applied to microprocessor control bus circuits of block 12-24. This forces signal DBHOLD to a predetermined state which prevents microprocessor 12-20 from accessing the microprocessor bus until the read-modify-write operation is completed. That is, signal DBHOLD allows the local memory 12-30 to read out the contents of the addressed location, send the data contents back to the system bus interface circuits and wait for the data to be delivered to processor 10-6. Upon receiving the local memory data, processor 10-6 completes the sequence by issuing a memory write and clear lock command. Upon the receipt of the memory write and clear lock command, the interface circuits load the address, data, and command into registers 12-42 through 12-46. The write command is converted into the appropriate microprocessor bus write command for writing the associated data contained in XTRDATA register of block 12-60 into local memory 12-30, completing the operation. Also, in response to the write command, the system lock circuits reset the memory lock flip-flop 12-901 which unlocks local memory 12-30 for allowing acceptance of another locking operation. It will be appreciated by those skilled in the art that many changes may be made without departing from the teachings of the present invention. For example, the invention may be used in conjunction with different types of protocols and commands. Also, while the preferred embodiment utilizes different PAL circuits to perform certain functions that such functions can be combined in certain instances and performed within a single circuit. Also, the invention is not limited to any specific type of circuit. APPENDIX I. COMMAND DESCRIPTIONS LOCAL MEMORY BUS CYCLE INITIATED OPERATION LOCAL BUS CYCLE INITIATED LOCK M/IO D/C W/R PTLOCKFF 1. MEMORY READ LOCK 1 1 1 0 0 2. MEMORY WRITE LOCK 1 1 1 1 X 3. MEMORY READ LOCK 1 1 1 0 1 TRANSLATED SYSTEM MEMORY BUS CYCLE OPERATION SYSTEM BUS CYCLE INITIATED BSLOCK BSSHBC MREF SWRIT 1. MEMORY TEST READ AND SET LOCK 1 0 1 0 2. MEMORY WRITE AND CLEAR LOCK 1 1 1 0 3. MEMORY READ 0 0 1 0 II. Description of PAL Circuits Description of equation symbols: (Where # = OR: ! = negation; and & = AND) MODULE XCM03 - System Bus Response Logic Circuits 12-90 This PAL handles all system bus responses for cycles directed at the memory. Pin Specifications: (Inputs) BSMREF PIN 1; BSLOCK PIN 2; BSSHBC PIN 3; LOCKFF PIN 4; BSADOG PIN 5; BSADOH PIN 6; MMOD06 PIN 7; MMOD07 PIN 8; MMSIZ0 PIN 9; MMSIZ1 PIN 10; PTLOKFF PIN 13; !XTRBSY PIN 14; (Outputs) MRWAK PIN 15; MMLOCK PIN 17; MMWAIT PIN 18; MMNAKR PIN 19; MMACKR PIN 20; II. Description of PAL Signals - Continued Equates: TEST_SET_LOCK MACRO {BSLOCK & !BSSHBC} CLEAR_LOCK MACRO {BSLOCK & BSSHBC} ADDR = [BSADOG,BSADOH]; MOD = [MMOD06,MMOD07]; MSIZE = [MMSIZ0,MMSIZ1]; MODULE XCM14 - System Lock Circuits 12-48 Pin Specifications: (Inputs) REFCLK PIN 1; !PTDTLD PIN 2; RXHAVE PIN 3; RXNAKR PIN 4; RXWAIT PIN 5; RXANYR PIN 6; RXPTWON PIN 7; RXMREF PIN 9; RXSRIT PIN 10; RXLOCK PIN 11; RXSHBC PIN 13; MBMCLR PIN 14; (Outputs) PTREQP PIN 23; PTLOCKN PIN 18; PTLOKFF PIN 17; Equates: EQUATIONS PTREQP : = PTDTLD & !MBMCLR # RXHAVE & RXPTWON & RXWAIT & !MBMCLR # RXHAVE & RXPTWON & PTNKFLS & !MBMCLR & (RXTMOT # !RXTMOT & RXNAKR & RXMREF & !RXLOCK # !RXTMOT & RXNAKR & RXMREF & RXLOCK & RXSHBC) # RXHAVE & PTLOCKN & !RXNARK & !RXWAIT & !MBMCLR & RXMREF & RXLOCK & RXSHBC; PTLOCKN : = RXHAVE & RXPTWON & RXMREF & RXLOCK & !RXSHBC & !RXTMOT & RXNARK & !MBMCLR # PTLOCKN & !(MBMCLR # RXHAVE & RXPTWON & !RXNAKR & !RXWAIT & RXANYR # RXHAVE & RXPTWON & PTNKFLP & RXTMOT) ; PTLOKFF : = RXHAVE & RXPTWON & RXANYR & RXMREF & RXLOCK & !RXSHBC & !RXNAKR & !RXWAIT & !MBMCLR # PTLOKFF & !(MBMCLR # RXHAVE & RXPTWON & RXANYR & RXMREF & RXLOCK & RXSHBC & !RXNAKR & !RXWAIT) ; MODULE XCM35 - Microprocessor to Bus Generator 12-82 Pin Specifications: (Inputs) PTLOKFF PIN 1; !HOTMI0 PIN 2; !HOTWR PIN 4; HOTLOCK PIN 5; !QBBE00 PIN 6; !QBBE01 PIN 7; !QBBE02 PIN 8; !QBBE03 PIN 9; QBAD16 PIN 10; QBAD17 PIN 11; QBAD24 PIN 13; (Outputs) CPMREF PIN 23; CPWRIT PIN 22; CPLOCK PIN 21; CPSHBC PIN 20; CPDBWD PIN 19; CPDBPL PIN 18; CPBYTE PIN 17; QBAD30 PIN 15; QBAD31 PIN 14; Equates: BYTEEN = [QBBE03,QBBE02,QBBE01,QBBE00]; MODULE XCM52 - XSM State Machine State Clear Generator Circuit - Part of 12-66 LOCKHOLD = !LKHLDCL & (C_REG_READSIN) & (S_REG--SETA_a) & BLOCK & !BSHBC # LOCKHOLD & !LKHLDCL. where LKHLDCL = (C_REG--WRITESIN) & (S_REG--SETA_a) & XBLOCK & XBSHBC # (C_REG--READSIN) & (S_REG--SETA_a) & XBLOCK & XBSHBC # (C_REG--MCLEAR) and where: S_REG = [XSMCSA, XSMCSB, XSMCSC, XSMCSD, XSMCSE]; C_REG = [XSMCCA, XSMCCB, XSMCCC, XSMCCD]; SETA_a = B00010; WRITESIN = B0100; READSIN = B1001; and, MCLEAR = B1111. XCD06 - Bus Interface Circuits 12-24 DB HOLD = LOCKHOLD. Thus, while the principles of the invention have now been made clear in an illustrative embodiment, there will be obvious to those skilled in the art possible modifications of structure, arrangements, proportions, the elements, materials, and components, used in the practice of the invention which are particularly adapted for specific environments and operating requirements without departing from those principles which are laid down in the accompanying claims.

Claims: Deadlock prevention apparatus in a multiprocessor system (10) having distributed shared resources, said multiprocessor system comprising a system memory (14), a number of system processors (10-2, 10-4, 10-6) and a number of peer processors (12-2, 12-4), each processor being tightly coupled to a system bus (16) for transferring requests according to a first protocol, each of said peer processors (12-2, 12-4) comprising: a microprocessor (12-20); an on-board local memory (12-30); a synchronous local bus (12-25) connected for tightly coupling said microprocessor (12-20) and said local memory (12-30) together to operate according to a second protocol; bus interface circuits (12-40) coupled to said system bus (16) and to said synchronous local bus (12-25) for transferring (i) requests to a peer processor (12-2) received via said system bus (16) from any one of said system processors (10-2, 10-4, 10-6) and/or other ones of said peer processors (12-4); and (ii) requests generated by said microprocessor (12-20) of a peer processor (12-2) to said system bus (16) according to said second protocol for reading and writing said system memory (14) or said local memory (12-30) of another one of said peer processors (12-4); and response logic means (12-90) coupled to said system bus (16) for generating responses to requests transmitted to or received from said system bus, characterized in that each of said peer processors (12-2, 12-4) further comprises processor system lock indicator means (12-48) coupled to said system bus (16) and to said response logic means (12-90); and the response logic means (12-90) comprise an on-board memory lock indicator (12-901) coupled to said system bus; wherein said on-board memory lock indicator (12-901) is set in response to each memory read lock command generated by one of said processors and received from said system bus (16) which is used for performing a read-modify-write operation on an item of information stored in said local memory (12-30) in response to each memory read lock command, said bus interface circuits (12-40) generating an output signal on said local bus (12-25) to said microprocessor (12-20) for inhibiting further accesses by said microprocessor to said local memory (12-30) until completion of said read-modify-write operation by said local memory; and said processor system lock indicator means (12-48) is set in response to a first memory read lock request received from the microprocessor (12-20) and transferred by said bus interface circuits (12-40) to the system bus (16) and acknowledged by said response logic means (12-90) of a specified one of said peer processors, said processor system lock indicator means (12-48), when set, generating an output lock signal (PTLOKFF) for inhibiting said bus interface circuits (12-40) from transferring any further memory read lock requests from the microprocessor to said system bus (16) until completion of said first read lock request, thereby preventing a possibility of a deadlock condition in accessing said on-board local memories (12-30) of said peer processors (12-2, 12-4). The apparatus of claim 1, characterized in that said bus interface circuits (12-40) convert each memory read lock command subsequently received from said microprocessor (12-20) during the completion of said first read lock request into a normal read command. The apparatus of claim 1, characterized in that said output signal from said on-board memory lock indicator (12-901) causes said response logic means (12-90) to signal non-acceptance of each subsequent memory lock request received from said system bus (16) until completion of said microprocessor memory read lock command. The apparatus of claim 1, characterized in that said first protocol used to access said system bus (16) is a memory bus protocol. The apparatus of claim 1, characterized in that said second protocol used to access local memory (12-30) is a synchronous local bus protocol. The apparatus of claim 1, characterized in that said bus interface circuits (12-40) include first conversion means (12-54) for converting the memory read lock commands received from said system bus (16) into commands consistent with said second protocol. The apparatus of claim 1, characterized in that said bus interface circuits (12-40) include second conversion means (12-82) for converting the memory read lock commands of the microprocessor (12-20) into commands which utilize said first protocol. The apparatus of claim 7, characterized in that said second converion means (12-82) converts a first write command following said first memory read lock command received from said microprocessor (12-20) into a write clear command. The apparatus of claim 8, characterized in that said processor system lock indicator means (12-48) in response to said write clear command received from said system bus (16) switches to a reset state enabling said peer processor to accept further system memory lock commands from said system bus (16). The apparatus of claim 7, characterized in that said first protocol utilizes a split bus cycle mode of operation.

Inventors: JOYCE THOMAS F, KEELEY JAMES W, JOYCE, THOMAS F., KEELEY, JAMES W.
Applicants: BULL HN INFORMATION SYST, BULL HN INFORMATION SYSTEMS INC.
Application year: 1992
Main classification: G06F15
IPC codes: G06F9, G06F15