Consider the rdt2.2 receiver in Figure 3.14, and the creation of a new packet in the self-transition (i.e., the transition from the state back to itself) in the Wait- for-0-from-below and the Wait-for-1-from-below states: sndpkt=make_ pkt(ACK,0,checksum) and sndpkt=make_pkt(ACK,0, checksum). Would the protocol work correctly if this action were removed from the self-transition in the Wait-for-1-from-below state? Justify your answer. What if this event were removed from the self-transition in the Wait- for-0-from-below state? [Hint: In this latter case, consider what would happen if the first sender-to-receiver packet were corrupted.]
If the sending of this message were removed, the sending and receiving sides would
deadlock, waiting for an event that would never occur. Here’s a scenario:
- Sender sends pkt0, enter the “Wait for ACK0 state”, and waits for a packet back
from the receiver
- Receiver is in the “Wait for 0 from below” state, and receives a corrupted packet
from the sender. Suppose it does not send anything back, and simply re-enters the
‘wait for 0 from below” state.
Now, the ender is awaiting an ACK of some sort from the receiver, and the receiver is
waiting for a data packet form the sender – a deadlock!