|
(for the week commencing 31st March 2008)
The purpose of this week's labsheet is to extend your understanding
of the cnet simulator and to use some simple plotting software
to present analysis of your protocols.
All files referred to in this labsheet are, of course, in
/cslinux/examples/CITS3230/Lab3.
REDUCE YOUR FRUSTRATION. UNDERTAKE THIS LABSHEET WITH A FRIEND.
- The previous labsheet developed a complete stop-and-wait protocol
which used acknowledgements to report the successful
arrival of data frames.
If a corrupted frame arrived,
the receiver would simply ignore it and the sender's timeout mechanism would
cause retransmission of the data frame.
This protocol,
although robust,
introduces some inefficiency because the sender is not directly (or quickly)
informed about a corrupt data frame arriving at the receiver.
The sender actually only infers the data frame corruption after a timeout
occurs.
The use of an additional negative-acknowledgement frame will reduce this
inefficiency.
Modify a copy of the provided stop-and-wait protocol to also use
negative-acknowledgements.
Have the receiver reply with a negative-acknowledgement when a corrupt
frame arrives.
[This is a fascinating problem -
don't panic about the apparent need for lots of tricky code.
Think about the problem -
it requires a bit of logic and only about 8 lines of code.]
- Use the gnuplot plotting program to compare the efficiencies
of the standard stop-and-wait protocol and your enhanced version
using negative-acknowledgements.
An example gnuplot command file and data file are provided on disk
with enough comments to get you started.
Note that you'll probably need, or want, to print extra statistics from your
protocols to determine the efficiency of your protocols.
In support of this,
experiment with the EV_SHUTDOWN event,
and the -f and -s command line options.
See also
www.csse.uwa.edu.au/cnet3/faq.html#plotting
- Develop the two sliding window protocols,
go-back-N and selective-repeat
introduced in Week 4.
Structure your protocols in such a way that the size of the sender's window,
say either 2, 3 or 4 bits, may be defined as a constant at the top of your
protocol implementation.
[Perhaps with a friend, develop and explain one protocol each or work together]
- Again, using the gnuplot plotting program,
produce a comparison of the efficiencies of the
go-back-N and selective-repeat protocols for varying window sizes.
Chris McDonald
March 2008.
|