Example 3 (queue service interval events)

This example shows a sequence of MQGET calls and MQPUT calls that is more sporadic than the previous examples.

Commentary

  1. At time T(0), the queue statistics are reset and Queue Service Interval High events are enabled.
  2. At P1, the first put starts the service timer.
  3. At P2, the second put increases the queue depth to two. A high event is not generated here because the service interval time has not been exceeded.
  4. At P3, the third put causes a high event to be generated. (The timer has exceeded the service interval.) The timer is not reset because the queue depth was not zero before the put. However, OK events are enabled.
  5. At G1, the MQGET call does not generate an event because the service interval has been exceeded and OK events are enabled. The MQGET call does, however, reset the service timer.
  6. At G2, the MQGET call does not generate an event because the service interval has been exceeded and OK events are enabled. Again, the MQGET call resets the service timer.
  7. At G3, the third get empties the queue and the service timer is equal to the service interval. Therefore an OK event is generated. The service timer is reset and high events are enabled. The MQGET call empties the queue, and this puts the timer in the OFF state.

Figure 6. Queue service interval events - example 3
Illustration showing a graph of queue depth against time for three put and get operations. There are seven points along the time axis:  T0  The initial point of interest. The queue depth is at its lowest point. P1   The first put command is invoked. The queue depth increases The first service interval starts here. The service timer is switched on. P2  The second put command is invoked. The queue depth increases again. P3  The third put command is invoked. The queue depth increases again. The first service interval ends before this point. A Queue Service Interval HIGH event is generated. G1  The first get command is invoked. The queue depth decreases. The second service interval starts heret. The service timer is restarted. G2  The second get command is invoked. The queue depth decreases. The second service interval ends before this point. The third service interval starts here. The service timer is restarted. G3  The third get command is invoked. The queue depth decreases back to its original level. The third service interval ends at this point. A Queue Service Interval OK event is generated. The service timer is switched off.

Event statistics summary for example 3

Table 8 summarizes the event statistics for this example.

Table 8. Event statistics summary for example 3
Event 1 Event 2
Time of event T(P3) T(G3)
Type of event High OK
TimeSinceReset T(P3) - T(0) T(G3) - T(P3)
HighQDepth 3 3
MsgEnqCount 3 0
MsgDeqCount 0 3