04.09.2013 Views

Algorithm Design

Algorithm Design

Algorithm Design

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

798<br />

Epilogue: <strong>Algorithm</strong>s That Run Forever<br />

buffers to output buffers, then all their input buffers and all their output buffers<br />

g} must<br />

form a bipartite matching. Thus we can model a single time step as follows.<br />

One step under input/output queueing:<br />

Packets arrive on input links and are placed in input buffers<br />

A set of packets whose types form a matching are moved to their<br />

associated output buffers<br />

At most one packet departs from each output buffer<br />

The choice of which matching to move is left unspecified for now; this is a<br />

point that will become crucial later.<br />

So under input/output queueing, the switch introduces some "friction" on<br />

the movement of packets, and this is an observable phenomenon: if we view<br />

the switch as a black box, and simply watch the sequence of departures on the<br />

output links, then we can see the difference between pure output queueing<br />

and input/output queueing. Consider an example whose first step is just like<br />

Figure E.1, and in whose second step a single packet s of type (I4, 04) arrives.<br />

Under pure output queueing, p and q would depart in the first step, and r and<br />

s would depart in the second step. Under input/output queueing, however,<br />

the sequence of events depicted in Figure E.2 occurs: At the end of the first<br />

step, r is still sitting in the input buffer 14, and so, at the end of the second<br />

step, one of r or s is still in the input buffer 14 and has not yet departed. This<br />

conflict between r and s is called head-of-line blockir~, and it causes a switch<br />

with input/output queueing to exhibit inferior delay characteristics compared<br />

with pure output queueing.<br />

Simulating a Switch with Pure Output Queueing While pure output queueing<br />

would be nice to have, the arguments above indicate why it’s not feasible<br />

to design a switch with this behavior: In a single time step (lasting only tens of<br />

nanoseconds), it would not generally be possible to move packets from each<br />

of n input links to a common output buffer.<br />

But what if we were to take a switch that used input/output queueing and<br />

ran it somewhat faster, moving several matchings in a single time step instead<br />

of just one? Would it be possible to simulate a switch that used pure output<br />

queueing? By this we mean that the sequence of departures on the output links<br />

(viewing the switch as a black box) should be the same under the behavior of<br />

pure output queueing and the behavior of our sped-up input/output queueing<br />

algorithm.<br />

It is not hard to see that a speed-up of n would suffice: If we could move<br />

n matchings in each time step, then even if every arriving packet needed to<br />

reach the same output buffer, we could move them a~ in the course of one<br />

(b)<br />

Epilogue: <strong>Algorithm</strong>s That Run Forever<br />

~ 02<br />

~ 0 3<br />

J O1<br />

____.------- 0 2<br />

~Packets q and r can’Q<br />

both move through<br />

the switch in one<br />

~me step.<br />

Iin<br />

As a result of r having ~<br />

to wait, one of packets|<br />

r and s will be blocked|<br />

this step.<br />

J<br />

Figure E.2 Parts (a) and (b) depict a two-step example in which head-of-line bloc!ring<br />

OCCURS.<br />

step. But a speed-up of n is completely infeasible; and if we think about this<br />

worst-case example, we begin to worry that we might need a speed-up of n to<br />

make this work--after all, what if all the arriving packets really did need to<br />

go to the same output buffer?<br />

The crux of this section is to show that a much more modest speed-up<br />

is sufficient. We’ll describe a striking result of Chuang, Goe!, McKeown, and<br />

Prabhakar (1999), showing that a switch using input/output queueing with a<br />

speed-up of 2 can simulate a switch that uses pure output queueing. Intuitively,<br />

the result exploits the fact that the behavior of the switch at an internal level<br />

need not resemble the behavior under pure output queueing, provided that<br />

the sequence of output link departures is the same. (Hence, to continue the<br />

799

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!