Scalable resource allocation
First Claim
1. A system for managing a limited resource, comprising:
- a plurality of hardware processing units;
a plurality of buckets, each of the plurality of buckets corresponding to a single respective hardware processing unit of the plurality of hardware processing units;
program instructions operative to cause the plurality of hardware processing units to perform actions, the actions including;
receiving, in a thread executing at a first hardware processing unit of the plurality of hardware processing units, a first request for resource units;
identifying a wallet allocated to the thread, wherein the wallet is allocated only to the thread, wherein the wallet comprises credits, allocated to the thread, for resource units;
determining that the wallet allocated to the thread does not comprise enough credits to fulfill the first request, wherein each credit is representative of a number of resource units;
selecting, in response to determining that the wallet does not comprise enough credits, a first bucket of the plurality of buckets based on the first bucket corresponding to the first hardware processing unit and based on the first hardware processing unit executing the thread, wherein the first bucket comprises credits, allocated to the first hardware processing unit, for resource units;
selectively determining that the first bucket corresponding to the first hardware processing unit comprises enough credits to fulfill the first request;
selectively retrieving at least one credit from the first bucket and adding the retrieved at least one credit to the wallet;
deducting at least one credit from the wallet to fulfill the first request;
receiving, in the thread, a second request for resource units;
determining that the wallet allocated to the thread does not comprise enough credits to fulfill the second request;
selectively determining that the first bucket does not comprise enough credits to fulfill the second request; and
selectively retrieving at least one credit from a second bucket corresponding to a second hardware processing unit, based on determining that the wallet allocated to the thread and the first bucket do not comprise enough credits to fulfill the second request.
2 Assignments
0 Petitions
Accused Products
Abstract
A device, system, and method are directed towards managing limited resources in a computer system with multiple processing units. Each processing unit has a corresponding bucket. Each thread executing on a processing unit has a corresponding wallet. Buckets and wallets contain credits corresponding to units of the limited resource. When a request for the resource is made, mechanisms of the invention attempt to fulfill the request by looking in a local wallet, a local bucket, or non-local buckets. In a resource shortage situation, credits may be moved to a primary bucket. A load balancing mechanism may distribute credits among buckets, or move credits from wallets to buckets.
-
Citations
14 Claims
-
1. A system for managing a limited resource, comprising:
-
a plurality of hardware processing units; a plurality of buckets, each of the plurality of buckets corresponding to a single respective hardware processing unit of the plurality of hardware processing units; program instructions operative to cause the plurality of hardware processing units to perform actions, the actions including; receiving, in a thread executing at a first hardware processing unit of the plurality of hardware processing units, a first request for resource units; identifying a wallet allocated to the thread, wherein the wallet is allocated only to the thread, wherein the wallet comprises credits, allocated to the thread, for resource units; determining that the wallet allocated to the thread does not comprise enough credits to fulfill the first request, wherein each credit is representative of a number of resource units; selecting, in response to determining that the wallet does not comprise enough credits, a first bucket of the plurality of buckets based on the first bucket corresponding to the first hardware processing unit and based on the first hardware processing unit executing the thread, wherein the first bucket comprises credits, allocated to the first hardware processing unit, for resource units; selectively determining that the first bucket corresponding to the first hardware processing unit comprises enough credits to fulfill the first request; selectively retrieving at least one credit from the first bucket and adding the retrieved at least one credit to the wallet; deducting at least one credit from the wallet to fulfill the first request; receiving, in the thread, a second request for resource units; determining that the wallet allocated to the thread does not comprise enough credits to fulfill the second request; selectively determining that the first bucket does not comprise enough credits to fulfill the second request; and selectively retrieving at least one credit from a second bucket corresponding to a second hardware processing unit, based on determining that the wallet allocated to the thread and the first bucket do not comprise enough credits to fulfill the second request. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A computer based method of providing resource units in a computer system having a plurality of hardware processing units, comprising:
-
providing a set of buckets, each bucket corresponding to a single respective hardware processing unit of the plurality of hardware processing units; providing a set of wallets, each wallet allocated to a single thread executing on one of the plurality of hardware processing units; distributing a plurality of credits among the buckets, each credit corresponding to a resource unit; in response to receiving a first request for resource units from a requesting thread; identifying a wallet of the set of wallets allocated to the requesting thread, wherein the wallet comprises credits, allocated to the thread, for resource units; determining that the wallet does not comprise enough credits to successfully respond to the first request; selecting, in response to determining that the wallet does not comprise enough credits, a first bucket of the set of buckets based on the first bucket corresponding to a first hardware processing unit executing the requesting thread, wherein the first bucket comprises credits, allocated to the first hardware processing unit, for resource units; determining that the first bucket comprises enough credits to successfully respond to the first request; and selectively retrieving at least one credit from the first bucket and adding the retrieved at least one credit to the wallet; deducting at least one credit from the wallet to fulfill the first request; in response to receiving a second request for resource units from the requesting thread; determining that the wallet allocated to the thread does not comprise enough credits to fulfill the second request; selectively determining that the first bucket does not comprise enough credits to fulfill the second request; and selectively retrieving at least one credit from a second bucket corresponding to a second hardware processing unit, based on determining that the wallet allocated to the thread and the first bucket do not comprise enough credits to fulfill the second request; and periodically moving credits from at least some of the wallets to at least some of the buckets. - View Dependent Claims (11, 12, 13, 14)
-
Specification