Corporate and Professional Publishing Group


An Engineering Approach to Computer Networking

by S. Keshav

ISBN 0-201-63442-2 * Hardcover * 688 pages * 1997


Book Description · Preface · Glossary · Bibliography · Solutions · Slides · Simulator · Exercises · Errata · Cover (73K) · Ordering Information · C&P Welcome Page.


Flow Control

Goal

In this assignment, you will add to the code you developed for the exercise on error control to add:

How to do the assignment

As with the assignment on error control, you will fill in the blanks in a template file called sources/ecn_flow.c. The file has several additions, described next. The input file is ecn/flow.l.

First, in the assignment on error control, the source sets a timer per packet. In a real life implementation this can be expensive. Instead, we use a single timer, that is set to a different value each time a packet is sent. On the expiration of this timer, the next unacknowledged packet is retransmitted. In REAL, a node sets a timer by sending itself a TIMER packet that arrives after a fixed delay. There is no clean way to cancel such a packet once it has been sent. Thus, to emulate a single timer, we introduce a new field in the packet header, called the "id" field. A source maitains a state variable called transmission_id, which is incremented on packet transmission, and copied to the packet's id field. On a timeout, we check if the TIMER packet's id field is one less than the current transmission_id. If so, then this must be the 'latest' timer, which is therefore accepted. All other TIMER packets are discarded.

Second, the source implements dynamic window flow control. At any time, the largest number of packets outstanding is limited by the variable cur_window. This variable is incremented and decremented according to the rules used in TCP. When the variable changes, the value is plotted in a file called flow/winX, where X is the node id of the source. For example, the time series of window sizes for node 2 is plotted in file flow/win2. You can examine the output visually using a program such as xgraph or gnuplot.


What to submit (IMPORTANT)