主权项 |
1. A method comprising:
(a) operating an allocator circuit in a sequence of output determining phases and bubble sorting phases, wherein each output determining phase is followed by a bubble sorting phase, and wherein each bubble sorting phase is followed by an output determining phase; (b) maintaining, on the allocator circuit, 1) a resource value for each of a plurality of processing entities and 2) an indication of a processing entity for each of the resource values, wherein the allocator circuit comprises a bubble sorting module circuit comprised of combinatory logic and a state machine to form one or more chains, wherein each chain corresponds to a set of processing entities, wherein the resource value for a processing entity is indicative of an amount of a resource the processing entity has available, wherein the plurality of processing entities includes the set of processing entities; (c) receiving onto the allocator circuit an allocation request, wherein the allocation request is indicative of: 1) an amount of the resource requested, and 2) the set of processing entities; (d) in a first output determining phase, 1) determining, based at least in part on a bubble sort output, one processing entity from the set of processing entities, and 2) adjusting the resource value for the determined processing entity, wherein the resource value is adjusted in (d) by the amount of the resource indicated by the allocation request; (e) sending an allocation command from the allocator circuit to the processing entity determined in (d); (f) in a bubble sorting phase bubble sorting indications of processing entities of the set of processing entities based on the resource values of the processing entities and thereby determining a bubble sort output for the set of processing entities; (g) receiving onto the allocator circuit an allocation response, wherein the allocation response is indicative of: 1) the determined processing entity, and 2) the amount of the resource; and (h) in a second output determining phase, adjusting the resource value of the determined processing entity indicated by the allocation response, wherein the resource value is adjusted in (h) by the amount of the resource indicated by the allocation response, and wherein (b) through (h) are performed by the allocator circuit. |