Patent ID: 8365014

Claim:
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.