Ledger-based resource tracking
First Claim
1. A computer-implemented method comprising:
- receiving, at a processor, a resource request from a task, the task associated with a ledger object including a reference to a ledger template, the ledger 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 a ledger entries object, the ledger 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 ledger 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.
1 Assignment
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.
9 Citations
25 Claims
-
1. A computer-implemented method comprising:
-
receiving, at a processor, a resource request from a task, the task associated with a ledger object including a reference to a ledger template, the ledger 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 a ledger entries object, the ledger 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 ledger 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. A system comprising:
-
a processor; a task associated with a ledger object; the ledger object including a reference to a ledger template, the ledger 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 a ledger 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, a resource management module controlling the processor to receive the resource request from the task; and a ledger module controlling the processor to update 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. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. 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 a request for a first resource from a task, the task associated with a ledger object including a reference to a ledger template, the ledger template including an entry identifying the task and a pointer to a callback function, wherein the callback function is specific to the first resource requested and a ledger entries object, the ledger entries object including an entry for the first resource requested with a corresponding balance of current resources consumed and a corresponding predefined resource limit of the first resource requested, wherein values of the balance and the limit are defined specific to the first resource; and updating a record of resources consumed in the entry corresponding to the first resource in the ledger entries object, wherein the updating comprises comparing the balance of resources consumed against the predefined resource limit in the entry, and setting a flag when the balance exceeds the predefined limit. - View Dependent Claims (16, 17, 18, 19, 20, 21)
-
-
22. A computer-implemented method comprising:
-
updating, by a processor, an entry corresponding to a resource in a ledger entry object, the ledger object including a reference to a ledger template, the ledger template including an entry identifying a task and a pointer to a callback function, wherein the callback function is specific to the resource and a ledger 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, specific to the task in response to receiving a request for the resource from the task, the updating comprising recording the balance in the entry specified in the request, 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 (23, 24, 25)
-
Specification