EE5150: Communication Networks Assignment 3 solved

$35.00

Category: You will receive a download link of the .ZIP file upon Payment

Description

5/5 - (1 vote)

1. Implement a weighted fair queueing (WFQ) packet GPS multiplexer that
handles packets for four different queues or customers. Let C = 1000 bits
per second be the fixed capacity of the multiplexer and suppose that the
multiplexer has infinite buffer. We will assume that the weights for the
four queues are φ1 = 0.1, φ2 = 0.2, φ3 = 0.3 and φ4 = 0.4.
Guidelines:
• The virtual time process V (t) is simulated, as if there were a GPS
scheduler operating.
• When a packet arrives into the scheduler, it is marked with its virtual
finish time in the GPS scheduler.
• When a packet is selected for transmission, it is transmitted completely.
• After completion of service of a packet, the next packet to be transmitted is the one that has the smallest virtual finish time among all
the packets in the multiplexer. (Ties can be broken in various ways
– for example, by smallest queue index if the tie is between packets
of several queues).
Suppose that the input to the WFQ multiplexer is defined in a file input.txt
as shown below. Each line describes the following details of a packet
(delimited by a semi-colon) – id of the packet (int);time of arrival in seconds
(float);the size of the packet in bits (integer); the queue to which it belongs
to (1 or 2 or 3 or 4).
input.txt
Line1: 1;0.2;1000;1
Line2: 2;0.4;1500;2
Line3: 3;0.92;1000;4
Line4: 4;2.1;1500;4
Line5: 5;3.4;1000;3
Line6: 6;5.1;1000;2
The code must output the time of departure of the packets (identified by
their id) for the GPS and the WFQ multiplexer.
Instructions:
1. Submit the assignment as a zip file.
1
2. Kindly submit the code (preferably in C or C++). Kindly add comments
in the code to enable review.
3. The deadline for the submission is 7 October 2017.
4. The assignment carries 3 marks.
2