Detecting deadlocks in multithreaded programs
First Claim
Patent Images
1. A computer implemented method to be performed by a processing system, the method comprising:
- monitoring relationships between threads of a multithreaded program and mutually exclusive shared resources, the relationships created by resource operations performed by the threads, the resource operations related to at least one of the mutually exclusive shared resources;
generating at least one thread descriptor and at least one resource descriptor, based on the monitored relationships between the threads and the mutually exclusive shared resources, wherein the at least one thread descriptor corresponds to a thread in the multithreaded program and the at least one resource descriptor corresponds to a mutually exclusive shared resource; and
detecting deadlocks based on the relationships between the threads and the mutually exclusive shared resources, wherein said detecting deadlocks comprises;
constructing a live queue and a dead set based on the at least one thread descriptor and the at least one resource descriptor; and
checking deadlocks based on the live queue and the dead set.
2 Assignments
0 Petitions
Accused Products
Abstract
An arrangement is provided for detecting deadlocks in a multithreaded program. When a thread in a multithreaded program performs a resource operation related to a mutually exclusive shared resource, it creates relationships between the thread and the shared resource as well as between the thread and other threads of the multithreaded program. Such created relationships are monitored and used to detect deadlocks.
20 Citations
30 Claims
-
1. A computer implemented method to be performed by a processing system, the method comprising:
-
monitoring relationships between threads of a multithreaded program and mutually exclusive shared resources, the relationships created by resource operations performed by the threads, the resource operations related to at least one of the mutually exclusive shared resources; generating at least one thread descriptor and at least one resource descriptor, based on the monitored relationships between the threads and the mutually exclusive shared resources, wherein the at least one thread descriptor corresponds to a thread in the multithreaded program and the at least one resource descriptor corresponds to a mutually exclusive shared resource; and detecting deadlocks based on the relationships between the threads and the mutually exclusive shared resources, wherein said detecting deadlocks comprises; constructing a live queue and a dead set based on the at least one thread descriptor and the at least one resource descriptor; and checking deadlocks based on the live queue and the dead set. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. An apparatus, comprising:
-
a tangible machine-accessible medium; and instructions in the machine-accessible medium, wherein the instructions, when executed by a processing system, cause the processing system to perform operations comprising; monitoring relationships between threads of a multithreaded program and mutually exclusive shared resources, the relationships created by resource operations performed by one or more of the threads, the resource operations related to at least one of the mutually exclusive shared resources; generating at least one thread descriptor and at least one resource descriptor, based on the monitored relationships between the threads and the mutually exclusive shared resources, wherein the at least one thread descriptor corresponds to a thread in the multithreaded program and the at least one resource descriptor corresponds to a mutually exclusive shared resource; and detecting deadlocks based on the relationships between the threads and the mutually exclusive shared resources, wherein the operation of detecting deadlocks comprises; constructing a live queue and a dead set based on the at least one thread descriptor and the at least one resource descriptor; and checking deadlocks based on the live queue and the dead set. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
-
21. A processing system, comprising:
-
a processor; a machine-accessible medium responsive to the processor; and instructions in the machine-accessible medium, wherein the instructions, when executed by the processor, cause the processing system to perform operations comprising; monitoring relationships between threads of a multithreaded program and mutually exclusive shared resources, the relationships created by resource operations performed by one or more of the threads, the resource operations related to at least one of the mutually exclusive shared resources; generating at least one thread descriptor and at least one resource descriptor, based on the monitored relationships between the threads and the mutually exclusive shared resources, wherein the at least one thread descriptor corresponds to a thread in the multithreaded program and the at least one resource descriptor corresponds to a mutually exclusive shared resource; and detecting deadlocks based on the relationships between the threads and the mutually exclusive shared resources, wherein the operation of detecting deadlocks comprises; constructing a live queue and a dead set based on the at least one thread descriptor and the at least one resource descriptor; and checking deadlocks based on the live queue and the dead set. - View Dependent Claims (22, 23, 24, 25, 26, 27, 28, 29, 30)
-
Specification