Patent ID: 9448836
Filing Date: 2016-09-20
CPC Classification: G06F

Claim Text:
1. A method for determining whether to pass control of a transaction, executing in a transactional memory environment, to an about-to-run-out-of-resource handler, the method comprising: determining, by a processor, information about an about-to-run-out-of-resource handler for transaction execution of a code region of a hardware transaction; dynamically monitoring, by the processor, an amount of available resource for the currently running code region of the hardware transaction; detecting, by the processor, that the amount of available resource for transactional execution of the hardware transaction is below a predetermined threshold level, wherein the threshold level is a level that is greater than exhaustion of available resources, wherein the available resource comprises of nesting levels, and wherein detecting that the amount of available resource for transactional execution is below the pre-determined threshold level further comprises determining that the amount of available resource for transactional execution will fall below the pre-determined threshold level upon execution of a pending instruction within the code region; based on detecting the amount of available resource is below the predetermined threshold level, saving, by the processor, speculative state information of the hardware transaction; and based on detecting the amount of available resource is below the predetermined threshold level, executing, by the processor, the about-to-run-out-of-resource handler, wherein the about-to-run-out-of-resource handler determines whether the hardware transaction is to be aborted or salvaged.