Fast resource recovery after thread crash
First Claim
Patent Images
1. A method comprising:
- maintaining, by a device, a counter that is associated with a plurality of threads;
incrementing the counter each time any of the plurality of threads crashes;
allocating, by the device, a resource to one of the plurality threads;
associating, by the device, a first value with the resource based on allocating the resource to the one of the plurality of threads,the first value corresponding to a value of the counter at a time that the resource is allocated to the one of the plurality of threads;
determining, by the device, that the one of the plurality of threads has crashed;
determining, by the device, a second value,the second value corresponding to a value of the counter at a time that the one of the plurality of threads has crashed;
using, by the device, the second value and the first value to determine whether to re-allocate the resource to the one of the plurality of threads.
1 Assignment
0 Petitions
Accused Products
Abstract
A resource recovery system may maintain a counter in memory that indicates a number of times one or more threads of execution, which use shared resources, have crashed. The system may associate a first value of the counter with a resource allocated to a thread of the one or more threads, and may set an indicator associated with the thread to indicate whether the thread has crashed. The system may determine whether to re-allocate the resource to the thread based on the first value of the counter associated with the resource and based on the indicator associated with the thread.
32 Citations
21 Claims
-
1. A method comprising:
-
maintaining, by a device, a counter that is associated with a plurality of threads; incrementing the counter each time any of the plurality of threads crashes; allocating, by the device, a resource to one of the plurality threads; associating, by the device, a first value with the resource based on allocating the resource to the one of the plurality of threads, the first value corresponding to a value of the counter at a time that the resource is allocated to the one of the plurality of threads; determining, by the device, that the one of the plurality of threads has crashed; determining, by the device, a second value, the second value corresponding to a value of the counter at a time that the one of the plurality of threads has crashed; using, by the device, the second value and the first value to determine whether to re-allocate the resource to the one of the plurality of threads. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system, comprising:
a processor to; maintain a counter associated with a plurality of threads of execution, increment the counter each time one of the plurality of threads of execution comprises a crashed state, allocate, at a first time, a resource to one of the plurality of threads of execution, determine, based on allocating the resource, a first value of the counter at the first time, determine, at a second time, that the one of the plurality of threads of execution comprises the crashed state, determine, based on the one of the plurality of threads of execution comprising the crashed state, a second value of the counter at the second time, restart the one of the plurality of threads of execution, and use the second value and the first value to determine whether to re-allocate the resource to the one of the plurality of threads of execution after restarting the one of the plurality of threads of execution. - View Dependent Claims (7, 8, 9)
-
10. A method comprising:
-
maintaining, by a device, a counter that indicates a quantity of times a plurality of threads of execution, which use shared resources, have crashed; associating, by the device, a first value of the counter with a resource, of the shared resources, that is allocated to a thread of the plurality of threads of execution, the first value of the counter corresponding to a value of the counter at a first time that the resource is allocated to the thread; determining, by the device, that the thread has crashed; incrementing, by the device the counter based on determining that the thread has crashed; setting, by the device, an indicator associated with the thread to indicate that the thread has crashed; re-starting, by the device, the thread based on setting the indicator; determining whether to re-allocate the resource to the thread based on the first value of the counter associated with the resource, a second value of the incremented counter, and the indicator associated with the thread. - View Dependent Claims (11, 12, 13, 14)
-
-
15. A system, comprising:
-
a thread crash counter that indicates a total quantity of times that a plurality of threads, which use shared resources, have crashed; and a resource recovery management unit to; set, at a first time, the thread crash counter to an initial value, obtain, at a second time, a first value of the counter, the first value indicating a total quantity of times that the plurality of threads have crashed during a first period that is defined by the first time and the second time, associate the first value of the counter with a resource allocated to a thread of the plurality of threads, determine, at a third time, that the thread has crashed, obtain a second value of the counter based on determining that the thread has crashed, the second value of the counter indicating a total quantity of times that the plurality of threads have crashed during a second period that is defined by the first time and the third time, determine if the second value of the counter is greater than the first value of the counter, and re-allocate the resource to the thread if the second value of the counter is greater than the first value of the counter. - View Dependent Claims (16, 17, 18)
-
-
19. A resource recovery system, comprising:
-
a memory to store instructions; and a processor to execute the instructions to; maintain a counter that indicates a quantity of times that a plurality of threads, which use shared resources, have crashed; obtain a first value of the counter when a resource, of the shared resources, is initially allocated to a thread of the one or more threads; associate the first value of the counter with the resource; determine that the thread has crashed; determine whether to re-allocate the resource to the thread based on the first value of the counter associated with the resource and a second value of the counter, the second value of the counter corresponding to a value of the counter at a time that the thread has crashed. - View Dependent Claims (20, 21)
-
Specification