NonStop S-Series Server Description Manual (G06.24+)

Input/Output Operations
HP NonStop S-Series Server Description Manual520331-003
10-24
Actions for Empty or Full Queues
Actions for Empty or Full Queues
In all of the actions described in the preceding topic, the read pointer is essentially
chasing the write pointer. That is, the writer of entries into a queue is adding new
entries to the head of the queue at some unpredictable, irregular rate, and the reader
of those entries is acting upon the entries at the tail of the queue, trying to catch up to
the most recently added entry. Ideally, these operations remain in balance and are self-
adjusting to a large degree. However, there are times when the read pointer does
catch up to the write pointer (the queue is empty), and there are times when the read
pointer falls so far behind that the write pointer, having wrapped around, catches up to
the read pointer (the queue is full). These two situations require processor or controller
interrupts for special handling. These situations are illustrated in Figure 10-12 and are
described here.
For the queue-empty condition, illustrated in the top part of Figure 10-12, both the
read pointer and the writer pointer are pointing to the same location in the queue.
Because it would be impractical for the controller to keep checking across the
ServerNet hardware for a change in this situation, the protocol is for queue services to
send a wakeup prod to the queue reader (the controller in some cases, a client
process in other cases). This prod consists of a single ServerNet packet sent to a
predetermined ServerNet address in an interrupt queue in the readers memory. When
that interrupt packet is read, the controller or client is notified that there is a new entry
in the queue. The reader then gets the entry at the current setting of the read pointer,
and normal operation resumes.
For the queue-full condition, illustrated in the lower two thirds of Figure 10-12, the
write pointer has wrapped around and caught up to the read pointer. This situation
causes the reader of that queue to send a full notice to the reader. The full notice is a
single ServerNet packet that informs the reader that the queue cannot accept any
more entries.
Although it is possible for the reader to resume writing as soon as one location is freed
(the read pointer advances by one), a low-water facility is available. The low-water
mark is a configurable parameter that allows the queue to acquire several empty
locations before the writer to resumes writing to the queue. The availability of these
empty locations can restore the read-write balance and minimize the necessity to send
frequent full notices across the ServerNet hardware.