Image Number 2 for United States Patent #7295565.
A system and method for sharing a resource (e.g., buffers) among multiple queues (e.g., InfiniBand send queues). Each queue has a local context indicating the Current amount of the resource allocated to the queue, the Minimum it is guaranteed, and a Maximum amount. A context may also include one or more pointers for managing the queue. Global Available and Reserve values indicate, respectively, the amount of the resource not currently allocated and the amount of the resource being reserved to guarantee each queue its Minimum. When an element is posted to a queue, a Full signal is raised for every queue to prevent further activity while the global values and the affected queue's context are updated. Then, if Available>0, the signal is de-asserted for any queue for which Current<Minimum or, if Available>Reserve, for any queue for which Current<Maximum.