[SOLVED] CS4150 Lab 6-Round-robin and Weighted-fair queuing

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon lab6-bkipvo.zip (243.7 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (2 votes)

(Round-robin and Weighted-fair queuing)

  1. Write a program called “rr” that implements round robin queuing disciple. This function should take the service rate as the input argument. The file “arrivals.txt” contains the list of packets arrivals. Each packet arrival is denoted by a line in this file as “W X Y Z”, where W is the packet arrival time, X is the packet ID, Y is the queue ID into which the packet arrives, and Z is the packet length. You should be able invoke your program as follows:
      ./rr 4.0 < arrivals.txt
    

    The output of the above invocation should be, for each packet, “U V” (without quotes), where
    U is the transmission time of the packet (“%.2f” format), and V is the packet ID. [50]

  2. Write a program called “wfq” that implements weighted-fair queuing disciple. This function should take, as arguments, the service rate and the weights for each of the queues. The file “arrivals.txt” contains the list of packets arrivals. Each packet arrival is denoted by a line in this file as “W X Y Z”, where W is the packet arrival time, X is the packet ID, Y is the queue ID into which the packet arrives, and Z is the packet length. You should be able invoke your program as follows:
      ./wfq 4.0 1.0 1.0 1.0 1.0 < arrivals.txt
    

    The output of the above invocation should be, for each packet, “U V W” (without quotes), where U is the transmission time of the packet (“%.2f” format), V is the packet ID, and W is the id of the queue that output this packet.

 

  • lab6-bkipvo.zip