Asked By : Adasel Pomik
Answered By : Wandering Logic
The throughput on input line 1 is $.4 times frac{10mathrm{Mb}}{s}times frac{1mathrm{packet}}{mathrm{KB}}timesfrac{1mathrm{B}}{8mathrm{b}} = .5mathrm{Kpackets}/mathrm{s}$. $frac{1}{4}$th of that is directed to buffer 1, so $.125mathrm{Kpackets/s}$. The throughput on input line 2 is $.875mathrm{Kpacket}/mathrm{s}$. Half of that is directed to buffer 1, so $.4375mathrm{Kpacket/s}$. The problem says that $R_{11}$, the measured average time of a packet from input 1 to output 1 is 5ms. The throughput of those packets is 125p/sec, so by Little’s Law the number of packets from input 1 inside buffer 1 averages 0.625. So 3-0.625=2.375 packets in buffer 1 must come from input 2. The throughput of input 2 packets in buffer 1 is 437.5p/s. By Little’s Law the response time for input 2 packets in buffer 1 is 5.43ms.
If it really is supposed to be the case that packets leave the buffer while they are being transmitted, then you can apply Little’s Law at any level of the hierarchy. You can apply it to the entire switch, to one of the outputs (the buffer + the transmitter), to just one of the buffers, or to one of the transmitters. When applied to the transmitter you would use the variety of Little’s Law that is sometimes called the “utilization law” [Lazowska, Zahorjan, Graham and Sevcik; Quantitative System Performance, 1984]. Output 1 is providing $562.5mathrm{packets/s}$, which is a utilization of $0.45$. So by the utilization law $0.45 = 562.5mathrm{packets/s}times S_{mathrm{transmit}}$, so $S_{mathrm{transmit}} = 0.8mathrm{ms}$. Thus the time in the buffer for packets from input 1 is $4.2mathrm{ms}$ rather than $5mathrm{ms}$ and the rest of the calculation proceeds similarly to above. (Apply Little’s Law twice.) Another way to look at it, which provides the same answer, is that the utilization of the transmitter is the average number of packets in the transmitter. So the average number of packets in the output 1 buffer and transmitter combined is $3+0.45=3.45$. Then you apply Little’s Law twice and you can confirm that you get exactly the same result as you get when assuming that each packet from input 1 takes $4.2mathrm{ms}$ in the buffer and $0.8mathrm{ms}$ in the transmitter.
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/13705