# Lecture 12. Emulating the Output Queue So far we have shown that it is possible to obtain the same throughput with input queueing as with output queueing.

## Presentation on theme: "Lecture 12. Emulating the Output Queue So far we have shown that it is possible to obtain the same throughput with input queueing as with output queueing."— Presentation transcript:

Lecture 12

Emulating the Output Queue So far we have shown that it is possible to obtain the same throughput with input queueing as with output queueing (iid arrival). Can we exactly emulate an output queueing? Suppose we know that an output queued switch services packets at certain times, is it possible to have an input queued switch serve packets in the same order? Does the answer depend on the arrival traffic pattern?

``Matching Output Queueing with a Combined Input Output Queueing’’ S. Chuang, A. Goel, N. Mckeown, B. Prabhakar, INFOCOM 99 There exists arrival patterns for which input queued switch can not emulate output queued switch. Speedup Number of packets served from a single input or to a single output in the same slot. Consider an N x N switch What is the speedup of an output queued switch? What is the speedup of an input queued switch?

Combined Input Output Queued Switch (CIOQ) Speedup between 1 and N Partly queued at the input, partly at the output Various classes of Output Queued Switches FIFO, WFQ It is possible to emulate a large class of output queued switches by combined input output queued switch with speedup of (2-1/N) (necessary and sufficient) for any arrival pattern

Why is a speedup of N not necessary? It is useless to bring all packets to output if they wait at the output. Need to bring packets at the output before they can leave.

Scheduling for Emulation of a FIFO output queued switch Every packet has a time to leave for output queued switch. For FIFO this is known when the packet arrives in the switch. Output thread of a packet is the number of packets waiting at the output which have departure time earlier than the new packet Input thread of a packet is the number of packets waiting at the input which have higher priority than the new packet.

Slack of a packet = Output thread – Input thread Clearly, it is undesirable to have a packet at an input with a low slack value.

Scheduling Strategy Arrival phase At most one packet arrives at an input every slot Need to decide input priority that time Input priority of packets may decrease after future arrivals But relative priority of existing packets do not change. Scheduling phase Matching (Stable Matching) Departure phase Packets are served in order of priority at the output Scheduling phase

Arrival Phase Suppose a new packet arrives Suppose there are X packets waiting in its output queue. The new packet is placed at position (X + 1) in its input queue. If the input queue does not have X packets, then the packet is placed at the end of the input queue.

Scheduling(Stable Matching) Either a packet is scheduled to an output Or a packet with higher input priority is scheduled from the same input Or a packet with higher output priority scheduled to the same output This policy emulates FIFO output queueing for speedup of 2

Proof Initially, slack is 0. Slack can not decrease for a speedup of 2 Thus, slack is always nonnegative When the packet is supposed to be served from the output, then its output thread is 0. Since slack is nonnegative, input thread must also be zero.

Thus, then a packet is the top priority in its input and output lists. So stable matching delivers the packet to its output, and since it is highest priority it departs immediately.

Nondecreasing Slack During the arrival phase, input thread increases by at most one. During the departure stage, output slack decreases by at most one. If the packet is scheduled in any of the two scheduling phases, then we need not concern ourselves with its slack. Otherwise, by property of stable matching either the input thread decreases or the output thread increases by one in each of the two scheduling phase. Hence, overall change in slack is nonnegative.

Download ppt "Lecture 12. Emulating the Output Queue So far we have shown that it is possible to obtain the same throughput with input queueing as with output queueing."

Similar presentations