Preventing deadlocks
AssigneeInternational Business Machines Corporation
InventorRussell Lee Lewis
Life of this patent
Estimating the term…
Abstract
A deadlock prevention mode indicator is provided, wherein the deadlock prevention mode indicator is a lock that can be held in a shared mode or in an exclusive mode by one or more of a plurality of threads, and wherein the plurality of threads can cause deadlocks while acquiring a plurality of data locks. An execution of the plurality of threads is serialized by allowing a data lock to be acquired by a thread in response to the thread holding the deadlock prevention mode indicator, wherein serializing the plurality of threads avoids any deadlock from occurring.
Claims20
A method, comprising:
- providing a deadlock prevention mode indicator, wherein the deadlock prevention mode indicator is a lock that can be held in a shared mode or in an exclusive mode by one or more of a plurality of threads, and wherein the plurality of threads can cause deadlocks while acquiring a plurality of data locks;
- and
- serializing, an execution of the plurality of threads, by allowing a data lock to be acquired by a thread in response to the thread holding the deadlock prevention mode Indicator, wherein serializing the plurality of threads avoids any deadlock from occurring.
A system, comprising:
- memory;
- and
- processor coupled to the memory, wherein the processor performs operations, the operations comprising:
- (i) maintaining a deadlock prevention mode indicator, wherein the deadlock prevention mode indicator is a lock that can be held in a shared mode or in an exclusive mode by one or more of a plurality of threads, and wherein the plurality of threads can cause deadlocks while acquiring a plurality of data locks;
- and
- (ii) serializing, an execution of the plurality of threads, by allowing a data lock to be acquired by a thread in response to the thread holding the deadlock prevention mode indicator, wherein serializing the plurality of threads avoids any deadlock from occurring.
An article of manufacture, wherein the article of manufacture performs operations on a computer, the operations comprising:
- providing a deadlock prevention mode indicator, wherein the deadlock prevention mode indicator is a lock that can be held in a shared mode or in an exclusive mode by one or more of a plurality of threads, and wherein the plurality of threads can cause deadlocks while acquiring a plurality of data locks;
- and
- serializing, an execution of the plurality of threads, by allowing a data lock to be acquired by a thread in response to the thread holding the deadlock prevention mode indicator, wherein serializing the plurality of threads avoids any deadlock from occurring.
A method for deploying computing infrastructure, comprising integrating computer-readable code into a computer, wherein the code in combination with the computer is capable of performing:
- providing a deadlock prevention mode indicator, wherein the deadlock prevention mode indicator is a lock that can be held in a shared mode or in an exclusive mode by one or more of a plurality of threads, and wherein the plurality of threads can cause deadlocks while acquiring a plurality of data locks;
- and
- serializing, an execution of the plurality of threads, by allowing a data lock to be acquired by a thread in response to the thread holding the deadlock prevention mode indicator, wherein serializing the plurality of threads avoids any deadlock from occurring.
Dependencies are inferred from the claim text.