svn://cs450.cs.uic.edu/pub/homeworks/hw5To simulate an unreliable link in a single computer, sender and receiver communicate through a third "proxy" process. This proxy listens on two ports to get data from sender and receiver. And forwards the received data at those two listening ports after some delay and with some forwarding probability to another two ports at which the receiver and sender are listening. However, to make things easier, you can only supply a base port to all programs and it will configure all the ports automatically using the base port. To start the proxy, run
./proxy -p <base port> -l <latency> -f <forwarding probability> -b <buffer size>At a high level, your job is to change the reliable transport protocol implementation in the template so that the following example execution always produces the correct result. In one terminal, you run the receiver in the following way, and it produces output as shown below.
./hw5_receiver 127.0.0.1 <base port> > RECEIVED_FILE # later on, this happens... File received, exiting.In a separate terminal, you run the sender:
cat ORIGINAL_FILE | ./hw5_sender 127.0.0.1 <base port> Sent 1020544 bytes in 25 seconds: 35 kB/s Estimated RTT: 1029 msIn the grading script, the proxy has a total buffer size of two packets (including packets in both directions). This is specified using the flag
-b 2
. This leaves enough room for a single ack and a single packet in flight at the same time.
If you send a second packet before the first one arrives at the destination, chances are that either an ack or the second packet will be lost, so it is important that you get your timeouts and your acknowledgments right.
A few things to pay attention to: ./hw4_score username base_port score_file
The grading script will checkout you code from svn, copy a image file supplied in the grading script directory to your directory and run 6 testcases with different latency and forwarding probability. If the received file's content is correct then you will get 1 point for that test-case. If the content is correct then the throughput is also calculated, which will be used for bonus points. Sample output from the grading script is following:
[SUCCESS] latency=300 forwarding=1 [1]: 1 [throughput (kB/s)=0.76] [SUCCESS] latency=200 forwarding=0.99 [1]: 1 [throughput (kB/s)=0.86] [SUCCESS] latency=100 forwarding=0.9 [1]: 1 [throughput (kB/s)=0.92] [SUCCESS] latency=50 forwarding=0.8 [1]: 1 [throughput (kB/s)=1.28] [SUCCESS] latency=20 forwarding=0.7 [1]: 1 [throughput (kB/s)=0.45] [SUCCESS] latency=10 forwarding=0.6 [1]: 1 [throughput (kB/s)=0.38] Total score: 6
Copyright 2016 The Board of Trustees of the University of Illinois.webmaster@cs.uic.edu |
WISEST Helping Women Faculty Advance Funded by NSF | ![]() | ![]() |