Patent GB-1361838-A (GB)
Title: Data processing systems
IPC: G06F9/46
Filed: 1971-09-30
Abstract: 1361838 Data processing systems INTERNATIONAL BUSINESS MACHINES CORP 30 Sept 1971 [28 Dec 1970] 45504/71 Heading G4A In a system comprising a plurality of processors (e.g. CPU's, control units, for performing a logical process) which contend for access to a serially re-usable resource SRR (a resource such as data, a program or hardware which can only be used by one user at a time), each processor has associated request and wait indicator storage locations, a wait indicator being stored when a requesting processor is unable to gain access to the SRR, arid the indicators of processors of both higher and lower priority processors are examined to determine whether a given requesting processor should gain access to the resource or be placed in the wait state. In the simple case of two processors contending for the SRR, Figs. 3A, 3B (not shown), a tie-breaker bit K determines which processor has priority. A requesting processor sets its request bit, examines the request bit of the other processor and if OFF gains use of the SRR. If the other request bit is ON the requesting processor sets its wait bit and remains in the requesting but waiting state until the other processor resets its request bit or the tiebreaker bit K is switched to indicate that the present processor has priority. Having used the SRR a processor resets its wait and request bits and switches the K bit to give priority to the other processor. In a more general system comprising N contending processors, priority is established in a given sequence having a variable starting point K. A requesting processor I sets its request bit R(I) and if a lock-out bit is set signifying that another processor has been granted access to the SRR or if, on scanning the request bits R(J) of higher priority processors K to I-1, a set bit R(J) is found, then the wait bit W(I) is set and a further high priority scan of the R(J) bits is initiated. If the high priority scan is completed without a set R(J) being found, the requesting processor I performs a low priority scan from I + 1 to K- 1 to see if any R(J)#W(J), i.e. a contending processor J of lower priority than I has not yet recognized I's priority (it may have entered the control phase before R(I) was set). If an R(J)#W(J) is found, processor I loops back to perform another high priority scan, if not processor I enters the control phase by setting lock-out bit L to 1. The R and W bits of all other processors are then scanned and further advancement of processor I is delayed until all other processor R bits are equal to their W bits. The priority indicator K is then incremented, bit L is reset and SRR is used, at the end of which operation R(I) is reset. The time spent contending for the SRR can be reduced by replacing contention for SRR by contention for a place in a queue. The process above is followed, but after setting L=0, instead of using SRR directly, the processor I attempts to enter the queue, and when successful resets R(I) and sets the first bit queue Q(I). As each next higher Q bit is reset by virtue of the associated processor moving up the queue, the processor under consideration moves its own Q bit up one place until the end of the queue is reached and access to SRR is granted. Some of the final steps in the process may be executed in parallel with use of the SRR.