Patent ID: 7567986

Claim:
A computer-readable medium comprising a storage media having computer executable instructions which, when executed by a computing system cause the computing system to implement a method for limiting resource usage of a version store, the method comprising: identifying a total resource limit, L, the limit indicating an amount of resources which cannot be exceeded by a total sum of all the resources consumed by all in-progress transactions with a version store; identifying a residual resource amount, o, the residual resource amount being the amount of resources consumed when no transactions are in progress; initializing a sum, S 1 , to the residual resource amount, δ, of a transaction; determining whether the residual resource amount, o, is greater than the limit, L; when the residual resource amount, o, is greater than the limit, L, then returning an error; and when the residual resource amount, δ, is not greater than limit L, for each transaction, Ti, wherein the subscript i being a positive integer, of a plurality of transactions relating the version store, acquiring resources necessary for processing the transaction by: obtaining a lock of a data structure that tracks the amount of resources potentially used in completing the plurality of transactions related to the version store; identifying the amount of resources, Ri, wherein the subscript i being said a positive integer, necessary for processing the each transaction Ti; determining if a sum, S 2 =(S+Ri), is greater than the limit, L; when the sum, S 2 =(S+Ri), is not greater than the limit, L, then setting the sum, S 1 , to (S+Ri) and starting the transaction Ti; when the sum, S 2 =(S+Ri), is greater than the limit, L, then waiting until sufficient resources are available; modifying the data structure to include information related to the new transaction; and releasing the lock thereafter.