TWiki> CS450fall09 Web>Homeworks>Homework4 (revision 2)EditAttach

This homework is being updated, please check back later.

Homework 4 - due Mon Sept 28 at 2 pm

In this homework, we implement reliable communication over a highly unreliable link. The homework template is available at:

svn://bits.cs.uic.edu/cs450f09/homeworks/hw4

Your job is to change 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.

./hw4_receiver 10080 > RECEIVED_FILE
UR: Minimum delay for this run is 274 ms
# later on, this happens...
File received, exiting.

In a separate terminal, you run the sender:

cat ORIGINAL_FILE | ./hw4_sender 127.0.0.1 10080
UR: Minimum delay for this run is 634 ms
Sent 1020544 bytes in 25 seconds: 35 kB/s
Estimated RTT: 1029 ms

For this homework, you can only have a single outstanding packet at any time. If you send a second packet before the first one arrives at the destination, the first packet will get 'clobbered', so it is important that you get your timeouts and your acknowledgments right.

A few things to pay attention to:

  • unreliable.{h,c} - do not edit these files: your turned in homework will be graded with a different unreliable.c. You can only depend on what is declared in unreliable.h
  • ur_socket() and ur_send(). You must use these calls to create your sockets and to send your packets. No send() or connect() calls anywhere except in unreliable.c
  • The file transferred: your program should work for any file, and reproduce it exactly. You can check this with the md5sum utility, or diff.
  • The RTT: you are to estimate the RTT using the EWMA technique, and use this to set your timeout period. With correctly tuned timeouts, lower RTT will result in higher throughput.
  • The command line options: you must support both IP address and port on the sender.
  • Keep your packets smaller than or equal to 1400 bytes.

Turn-in instructions

Same story as previous homeworks, except that your makefile should generate two binaries called hw4_ receiver and hw4_sender.

Edit | Attach | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2009-09-19 - 23:46:45 - Main.jakob
 
Copyright 2016 The Board of Trustees
of the University of Illinois.webmaster@cs.uic.edu
WISEST
Helping Women Faculty Advance
Funded by NSF