SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
James F. Kurose, Keith W. Ross
Chapter:
The Network Layer
Exercise:
Problems
Question:9 | ISBN:9780132856201 | Edition: 6

Question

Consider the switch shown below. Suppose that all datagrams have the same fixed length, that the switch operates in a slotted, synchronous manner, and that in one time slot a datagram can be transferred from an input port to an output port. The switch fabric is a crossbar so that at most one datagram can

be transferred to a given output port in a time slot, but different output ports can receive datagrams from different input ports in a single time slot. What is the minimal number of time slots needed to transfer the packets shown from input ports to their output ports, assuming any input queue scheduling order you want (i.e., it need not have HOL blocking)? What is the largest number of slots needed, assuming the worst-case scheduling order you can devise, assuming that a non-empty input queue is never idle?



TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

The  minimal number of  time slots needed is 3. The  scheduling  is as follows.

Slot  1: send X  in top input queue, send  Y in middle input queue.     

Slot  2:  send X in middle  input  queue, send  Y in bottom input queue

Slot  3: send Z  in bottom  input queue.

 Largest  number  of  slots  is  still  3.  Actually,  based  on  the  assumption  that  a  non-empty input  queue  is  never  idle,  we  see  that  the  first  time  slot  always  consists  of  sending  X  in the  top  input  queue  and  Y  in  either  middle  or  bottom  input  queue,  and  in  the  second  time slot,  we  can  always  send  two  more  datagram,  and  the  last  datagram  can  be  sent  in  third time slot. NOTE:  Actually,  if  the  first  datagram  in  the  bottom  input  queue  is  X,  then  the  worst  case would require  4 time slots. 

0 0

Discussions

Post the discussion to improve the above solution.