Here are the midterm review questions, selected from past CS2105 midterms and finals. No solution will be posted, but you are more than welcome to show the teaching staff your solution and discuss them with us, either online or during our office hours. I encourage you to discuss online as well, on the blog with your peers, and we will chip in when the discussion is heading in the wrong direction.
11 comments to Midterm Review Questions
Leave a Reply
You must be logged in to post a comment.
Does anyone have an answer for Q3? I thought all choices were possible.
If the window size is 11 and it is at 0 to 10, then it may send 0 after a timeout.
If the window size is 2 and it is at 9 to 10, then 9 will be sent after a timeout.
If the 10 is the last packet waiting to be acknowledged, it will be resent after a timeout.
11 could be sent after 10 naturally in most cases.
If the window consists of 10, 11 and 12, and only 11 has been acknowledged, 12 will be resent after resending 10.
If window size is 2 then wouldnt it just be 0s and 1s?
9 is possible if the receiver sent back ACK for packet 8 or NACK for packet 9 and requests for packet 9 again.
I would think its 12 because the rest of the numbers are all possible plus the sender is not expecting an ACK for packet 11 yet.
Feel free to comment further!!
@Elliot: the fact that the rest of the numbers are possible does not mean that 12 is not possible. If you think the answer is 12, you need to argue why 12 is not possible.
(Cannot answer MCQ by eliminating the non-answers.)
I think the answer is 12,
After the window size has full,
SR din send 3 packets together anymore.
Instead, it will wait for acknowledgement,
after receiving acknowledgement then only send a new 1
assume that server only has windows size 3,
and is 7,8,9 at the beginning,
server receives ack 7, and send pkt 10
so now is 8,9,10
receive ack 8, send pkt 11,
receive ask 9, send pkt 12,
So by the time 10 timeout, it is impossible to send out 12.
And so 12 is the answer.
Feel free to comment!
That’s true if you take the first transmission of 10 be be the one referred to the question. But what if the sender first receives an ACK for 11, then retransmits 10 due to 10’s timeout? The sender would have to retransmit 12 when it times out also.
You are assuming RTT takes many time since:
Sender sends out pkt 11 and pkt 12 already,
and gets Ack 11 already,
which is quite long time, then only timeout?
Then by the time pkt 12 timeout,
it should be also very long time later?
It’s still possibly though I think it is not that likely to happen… That is a very very worse case.
You can try “x”. Haha. But we don’t know the correct answer also. =_=
The question asks for what is possible/not possible, not asking about what is *likely* :)
Thanks teacher! ^^
Hello,
I would like to know for qn 7, do we need to consider duplicate ack? If so, then X and Y will be sending own their packets with increasing sequence number. If there isn’t duplicate ack to consider, they will be sending their packets according to each other’s ACK?
According to the graph, I think it should be dup ACK
I am not sure I understand the question.
Duplicate ack is a natural part of TCP. When a receiver receives packet with a gap in sequence numbers, it will send a duplicate ack, since the one that it is waiting for hasn’t arrived.