CS 3413 Data Communications, Fall 2004 Assignment 5 Comments
This assignment had 12 questions, each worth 10 points, except for number 11
which had 2 parts (the table and the question) each worth 10 points.
The maximum score on this assignment is 130 points.
- Problems 1-6.Each problem was worth 10 points.
If you got one of the 4 answers wrong for a given
problem you lost 1 point.
If you got 2 wrong you lost 5 points.
If you got 3 wrong you lost 8 points.
- Problem 7-11. Each subanswer was worth 1 point.
The arrived array is an array of boolean,
containing true and false (or 0 and 1).
Information about the frame with sequence number n is stored
in array entry (n % NR_BUFS) which in this case is
(n % 4).
If you did not understand this or you got
more than half of the entires wrong, you lost 10 points total for these
20 answers.
- Problem 7. no_nak is true if no nak has been sent for
the frame expected.
As soon as a frame comes in out of order, a nak is sent if no_nak
is true, and no_nak is set to be false (in send_frame).
In this case we know that frames have been already received out of order
so no_nak muse be false.
- Problem 11.
When describing which frame is sent, you should indicate the
frame type (data in this case), the sequence number used (7 in this case)
and the ack field (in this case 2).
For this assignment, you got credit for just saying that frame with
sequence number 7 was retransmitted.
- Problem 12. An ack timeout is not the same thing as a normal
timeout.
It causes an ack frame to be sent.
It does not cause the sender to retransmit any data frames.
Indicate the type of frame (ack) and the ack field (2 in this case).
For this assignment, you got credit for just saying that an ack from
was sent.
Answers for Problems 1-6:
| variable | 1 | 2 | 3 | 4 | 5 | 6 |
| ack_expected | 4 | 7 | 4 | 7 | 0 | 7 |
| next_frame_to_send | 0 | 0 | 0 | 2 | 2 | 4 |
| frame_expected | 3 | 3 | 4 | 5 | 6 | 5 |
| nbuffered | 4 | 1 | 4 | 3 | 2 | 5 |
Answers for Problems 7-11:
| variable | 7 | 8 | 9 | 10 | 11 |
| ack_expected | 5 | 7 | 5 | 5 | 7 |
| next_frame_to_send | 0 | 0 | 0 | 1 | 0 |
| frame_expected | 3 | 3 | 5 | 3 | 3 |
| too_far | 7 | 7 | 1 | 7 | 7 |
| nbuffered | 3 | 1 | 3 | 4 | 1 |
| no_nak | ? | 0 | 1 | ? | ? |
| arrived[0] | 1 | 1 | 0 | 1 | 1 |
| arrived[1] | 0 | 1 | 0 | 0 | 0 |
| arrived[2] | 1 | 1 | 1 | 1 | 1 |
| arrived[3] | 0 | 0 | 0 | 0 | 0 |