Ledger-based resource tracking
First Claim
1. A non-transitory computer-readable storage media storing instructions which, when executed by a computing device, causes the computing device to perform steps comprising:
- receiving, at a processor, a resource request from a task, the task associated with a resource tracking object including;
(i) a reference to a template including an entry identifying the task and a pointer to a callback function, wherein the callback function is specific to the resource requested, and(ii) an entries object including an entry for the resource requested with a corresponding balance of current resources consumed and a corresponding predefined resource limit of the resource requested, wherein values of the balance and the limit are defined specific to the resource;
registering, at the processor, the resource for tracking in the template; and
updating, at the processor, the balance of resources consumed, wherein the updating comprises comparing the balance of resources consumed against the predefined resource limit, and setting a flag when the balance exceeds the predefined resource limit.
0 Assignments
0 Petitions
Accused Products
Abstract
Disclosed are systems, methods, and non-transitory computer-readable storage media for tracking and managing resource usage through a ledger feature that can trigger complex real-time reactions. The resource tracking can be managed through a ledger module and a ledger data structure. The ledger data structure can be updated each time a task requests a resource. Additionally, as part of the update, the ledger module can verify whether a resource has been over consumed. In response to the detection of an over consumption, the ledger module can set a flag. At some later pointer when the thread is in a stable, well-understood point, the ledger module can check if the flag has been set. If the flag has been set, the ledger module can call the appropriate callback function, which can react to the over consumption in a resource specific manner.
14 Citations
20 Claims
-
1. A non-transitory computer-readable storage media storing instructions which, when executed by a computing device, causes the computing device to perform steps comprising:
-
receiving, at a processor, a resource request from a task, the task associated with a resource tracking object including; (i) a reference to a template including an entry identifying the task and a pointer to a callback function, wherein the callback function is specific to the resource requested, and (ii) an entries object including an entry for the resource requested with a corresponding balance of current resources consumed and a corresponding predefined resource limit of the resource requested, wherein values of the balance and the limit are defined specific to the resource; registering, at the processor, the resource for tracking in the template; and updating, at the processor, the balance of resources consumed, wherein the updating comprises comparing the balance of resources consumed against the predefined resource limit, and setting a flag when the balance exceeds the predefined resource limit. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A system comprising:
-
a processor; a task associated with a resource tracking object; the resource tracking object including; (i) a reference to a template, the template including an entry identifying the task and a pointer to a callback function, wherein the callback function is specific to a resource requested, and (ii) an entries object including an entry for the resource requested with a corresponding balance of current resources consumed and a corresponding predefined resource limit of the resource requested, wherein values of the balance and the limit are defined specific to the resource; the processor receiving the resource request from the task; and the processor updating the balance of resources consumed related to the task, wherein the updating comprises setting a flag when the resource consumption balance exceeds the predefined resource limit.
-
-
18. A computer-implemented method comprising:
-
receiving, at a processor, a resource request from a task, the task associated with a resource tracking object including; (i) a reference to a template including an entry identifying the task and a pointer to a callback function, wherein the callback function is specific to the resource requested, and (ii) an entries object including an entry for the resource requested with a corresponding balance of current resources consumed and a corresponding predefined resource limit of the resource requested, wherein values of the balance and the limit are defined specific to the resource; registering, at the processor, the resource for tracking in the template; and updating, at the processor, the balance of resources consumed, wherein the updating comprises comparing the balance of resources consumed against the predefined resource limit, and setting a flag when the balance exceeds the predefined resource limit.
-
-
19. A non-transitory computer-readable storage media storing instructions which, when executed by a computing device, causes the computing device to perform steps comprising:
-
updating, by a processor, an entry corresponding to a resource in a resource tracking object, the resource tracking object including; (i) a reference to a template including an entry identifying a task and a pointer to a callback function, wherein the callback function is specific to the resource, and (ii) an entries object including an entry for the resource with a corresponding balance of current resources consumed and a corresponding predefined resource limit of the resource, wherein values of the balance and the limit are defined specific to the resource; the updating includes recording the balance for the entry specified in a request for the resource from the task, and setting a flag when the balance for the entry exceeds the resource limit defined in the entry; identifying, by a processor, that the flag is set prior to the task returning to user space; and calling, by a processor, the callback function specific the resource. - View Dependent Claims (20)
-
Specification