TWiki> CS450fall09 Web>Homework8 (revision 1)EditAttach

Homework 8 - multiple access control

In this homework, we experiment with the problem of multiple access control. Begin by copying the homework template to your submission directory using svn as before (use svn cp, not checkout, to add hw8 to your already checked out turn-in directory).

You are to fill in code for the functions in station.c, and if you desire, alter the struct in station.h. Be aware that your code will be tested against the original hw8.{h,c}, so any changes you make to these files are temporary.

The assignment

hw8.c creates a variable number of 'stations', each of which has an associated 'queue' of packets to transmit. In each time step, the queue length of each station is increased with some probability, which depends on the number of stations and the specified load. Then, each station that has a packet to transmit is asked whether it wishes to transmit in this time step. If a single station decides to transmit, the transmission succeeds and the station's queue length is reduced by one. However, if more than one station transmits, all transmissions fail, and queue lengths are preserved for next round.

Editing only station.c, and using no coordination between stations other than that afforded by the three template functions, implement a multiple access control protocol that reliably achieves within 10% of the theoretical utilization limit at 100% load.

Using gnuplot, create PDF files of the following two plots:

In one plot called 'loads.pdf', three lines displaying: 1 stations, load of 1,2,3...100. 10 stations, load of 1,2,3...100. 100 stations, load of 1,2,3...100.

In one plot called 'stations.pdf', three lines displaying: 1,2,3...100 stations, load of 10 1,2,3...100 stations, load of 30 1,2,3...100 stations, load of 100

Annotate your plots correctly, with x and y axis labels as well as legends for the three lines.

Turn-in instructions

Make sure your code compiles by running 'make'. Running 'make plots' should automatically run the experiments for the plots above, and create the plots.

Commit the code, and two representative plots, as in previous homeworks.


If your version of gnuplot does not produce PDFs, you can plot to a postscript (.ps) file, and use pstopdf to convert it to PDF.

Edit | Attach | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2009-11-09 - 04:58:42 - Main.jakob
Copyright 2016 The Board of Trustees
of the University of
Helping Women Faculty Advance
Funded by NSF