Method for managing a queue in host memory for use with a peripheral
device. Roughly described, the host makes a determination of the
availability of space in the queue for writing new entries, in dependence
upon historical knowledge of the number of queue entries that the host
has authorized the device to write, and the number of entries that the
host has consumed. In dependence on that determination, the host
authorizes the device to write a limited number of new entries into the
queue. The device writes entries into the queue dependence upon the
number authorized. The host maintains a read pointer into the queue but
does not need to maintain a write pointer, and the peripheral device
maintains a write pointer into the queue but does not need to maintain a
read pointer.