← Back to Patent Explorer
US4189771A Expired / Lapsed US ⏱️ 0.0 years remaining

Method and means for the detection of deadlock among waiting tasks in a multiprocessing, multiprogramming CPU environment

Assignee: International Business Machines Corp
•
Filing: 1977-10-11
•
Granted: 1980-02-19
•
Expires: 1997-10-11
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract The wait relations among N tasks in a multiprocessing, multiprogramming CPU environment are conformed to a vector of N+1 fields recording which tasks in a system are active and upon what other task any given task directly waits. The vector may be stored in a global register. Positions 1 through N are assigned to the N tasks such that a value p in position r means that task r is waiting directly on task p. One value j of the possible values 0,1,2, . . . , N+1 is designated to indicate an active task. Position j always shows the value j. Without loss of generality and to facilitate the discussion j is assumed to be 0. Thus, the value 0 in register position r means that task r is not waiting and position 0 always has the value 0. The presence of any deadlocks (closures) among the wait relations can always be detected by the computing system by making repeated translations of the vector fields within and upon themselves in no more than log 2 (N+1) iterations. In this regard, log 2 (N+1) denotes the smallest integer equal to or greater than the base 2 logarithm. The translation of fields within and upon themselves means that for each global register position r containing pointer p, then the contents g of register position p are substituted as the new contents of position r for the iteration 0≦r, p, g≦N.

Inventors

  • 👤 Paul R. Roever

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-10-24 18:04
CPC Classifications
G; G06; G06F; G06F9/00; G06F9/06; G06F9/46; G06F9/52; G06F9/524

Claims Analysis

Total Claims: 9
Claim 1
Independent Claim 226 words
A method for detecting deadlocks among N tasks in a multiprocessing, multiprogramming CPU environment in which any one task is constrained to wait upon, at most, one other task, the method comprising the steps of: creating a vectored representation of task waiting relations including the steps of: loading in a register a field of N+1 pointers, the pointers and their position order within said register defining wait relations among the tasks; assigning to the j th register position the pointer value j; reiteratively executing at least one selected CPU instruction operating upon the vectored representation including the steps of translating the field of pointers with and upon itself including the steps of: substituting the contents g of register position p for each register position r containing a pointer p; continuing said substituting step for the iteration where r, p and g lie in the range greater than or equal to 0 and less than or equal to N; testing the register for the occurrence of at least one pointer whose value is not equal to j; upon the detection of at least one non-j pointer repeating the translating and testing steps until the set of non-j pointers would remain the same from one iteration to the next, such result being indicative of closure or deadlock and alerting at least one CPU of said closure or deadlock.
Claim 2
Independent Claim 226 words
A method for detecting deadlocks among N tasks in a multiprocessing, multiprogramming CPU environment in which any one task is constrained to wait upon, at most, one other task, the method comprising the steps of: creating a vectored representation of task waiting relations including the steps of: loading in a register a field of N+1 pointers, the pointers and their position order within said register defining wait relations among the tasks; assigning to the j th register position the pointer value j; reiteratively executing at least one selected CPU instruction operating upon the vectored representation including the steps of translating the field of pointers with and upon itself including the steps of: substituting the contents g of register position p for each register position r containing a pointer p; continuing said substituting step for the iteration where r, p and g lie in the range greater than or equal to 0 and less than or equal to N; testing the register for the occurrence of at least one pointer whose value is not equal to j; upon the detection of at least one non-j pointer repeating the translating and testing steps until the set of non-j pointers would remain the same from one iteration to the next, such result being indicative of closure or deadlock and alerting at least one CPU of said closure or deadlock.
Claim 3
Dependent Claim 32 words
A method according to claim 1 wherein the number of repetitions of the translating and testing steps in order to detect closure is less than or equal to log 2 (N+1) .
Claim 4
Dependent Claim 47 words
A method according to claim 1, wherein upon j being set equal to zero, then register position zero must always contain the value zero, whereby the pointer value zero in any other register position denotes an active task with an all zero method result connoting no closure.
Claim 5
Independent Claim 237 words
A method for detecting deadlocks in a multiprogramming, multiprocessing CPU environment in which any one of N tasks is constrained to wait upon, at most one other task, the method comprising the steps of: creating a vectored representation of task waiting relations in a field of N+1 pointers in a register, the pointers and their position order within said register defining the wait relations among the tasks; assigning task pointer values to register positions such that for any task x waiting upon task y, then task x occupies a higher register position than task y, register position 0 being assigned the value 0; substituting a pointer of the same numerical value as the counterpart register position for any given task A that is about to wait upon any given task B where B has a higher register position than task A; reiteratively executing at least one selected CPU instruction operating upon the vectored representation including the step of translating the field of pointers with and upon itself including the steps of: substituting the contents g of register position p for each register position r containing a pointer p; continuing said substituting step for the iteration where r, p and g lie in the range greater than or equal to 0 and less than or equal to N; indicating deadlock or closure to at least one CPU if task A's register position number occurs in task B's position.
Claim 6
Independent Claim 237 words
A method for detecting deadlocks in a multiprogramming, multiprocessing CPU environment in which any one of N tasks is constrained to wait upon, at most one other task, the method comprising the steps of: creating a vectored representation of task waiting relations in a field of N+1 pointers in a register, the pointers and their position order within said register defining the wait relations among the tasks; assigning task pointer values to register positions such that for any task x waiting upon task y, then task x occupies a higher register position than task y, register position 0 being assigned the value 0; substituting a pointer of the same numerical value as the counterpart register position for any given task A that is about to wait upon any given task B where B has a higher register position than task A; reiteratively executing at least one selected CPU instruction operating upon the vectored representation including the step of translating the field of pointers with and upon itself including the steps of: substituting the contents g of register position p for each register position r containing a pointer p; continuing said substituting step for the iteration where r, p and g lie in the range greater than or equal to 0 and less than or equal to N; indicating deadlock or closure to at least one CPU if task A's register position number occurs in task B's position.
Claim 7
Dependent Claim 21 words
A method according to claim 4, wherein the number of repetitions for the detection of closure is no more than one.
Claim 8
Dependent Claim 359 words
In a method for allocating one or more serially reusable resources to individual ones of a plurality of tasks in a multiprogramming, multiprocessing CPU environment in which any one task is constrained to wait upon, at most, one other task, each executable task being transferrable to either an active or wait state, upon execution each task being set into the active state starting with a predetermined function in the sequence of functions defined by the program component of the task, the method comprising the steps of: requesting a named resource by a task; ascertaining resource availability; if said resource is available, locking the resource to the requesting task; if said resource is not available, testing the effect of whether transferring the requesting task to a wait state would result in a deadlock with other tasks by creating a vectored representation of task waiting relations including the steps of: loading in a register a field of N+1 pointers, the pointers and their position order within said register defining wait relations among the tasks; assigning to the j th register position the pointer value j; reiteratively executing at least one selected CPU instruction operating upon the vectored representation including the steps of translating the field of pointers with and upon itself including the steps of: substituting the contents g of register position p for each register position r containing a pointer p; continuing said substituting step for the iteration where r, p and g lie in the range greater than or equal to 0 and less than or equal to N; testing the register for the occurrence of at least one pointer whose value is not equal to j; and repeating the translating steps until the set of non-j pointers would remain the same from one iteration to the next, an upper limit of the number of translating steps required being ≦ log 2 (N+1) , such stabilized results being indicative of closure or deadlock; and resetting and restarting the requesting task or another task in the set defined by the translated and stabilized set of non-j pointers, if the transfer to the wait state would have resulted in a deadlock.
Claim 9
Dependent Claim 359 words
In a method for allocating one or more serially reusable resources to individual ones of a plurality of tasks in a multiprogramming, multiprocessing CPU environment in which any one task is constrained to wait upon, at most, one other task, each executable task being transferrable to either an active or wait state, upon execution each task being set into the active state starting with a predetermined function in the sequence of functions defined by the program component of the task, the method comprising the steps of: requesting a named resource by a task; ascertaining resource availability; if said resource is available, locking the resource to the requesting task; if said resource is not available, testing the effect of whether transferring the requesting task to a wait state would result in a deadlock with other tasks by creating a vectored representation of task waiting relations including the steps of: loading in a register a field of N+1 pointers, the pointers and their position order within said register defining wait relations among the tasks; assigning to the j th register position the pointer value j; reiteratively executing at least one selected CPU instruction operating upon the vectored representation including the steps of translating the field of pointers with and upon itself including the steps of: substituting the contents g of register position p for each register position r containing a pointer p; continuing said substituting step for the iteration where r, p and g lie in the range greater than or equal to 0 and less than or equal to N; testing the register for the occurrence of at least one pointer whose value is not equal to j; and repeating the translating steps until the set of non-j pointers would remain the same from one iteration to the next, an upper limit of the number of translating steps required being ≦ log 2 (N+1) , such stabilized results being indicative of closure or deadlock; and resetting and restarting the requesting task or another task in the set defined by the translated and stabilized set of non-j pointers, if the transfer to the wait state would have resulted in a deadlock.

References Cited (Backward Citations)

US3593300A Cited
US3643222A Cited
US3648252A Cited
US3648253A Cited
US4047161A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 1983-02-18 1983-08-20 1984-02-19 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 1987-02-18 1987-08-20 1988-02-19 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 1991-02-18 1991-08-20 1992-02-19 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag