Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
A message is sent as packets, numbered to . Because of packet switching, the packets reach the receiver in this order:
Data is broken down into packets. Each packet has a header (destination address, packet number, originator's address), a payload (the data) and a trailer (marks the end). In packet switching, each packet could take a different route, a router controls the route, packets may arrive out of order, and they are reordered once the last one has arrived. The number of packets is the file size divided by the payload size, rounded up.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Step 1. Count to packet 6. The list is Packet is the third to arrive, so the receiver has packets stored.
Step 2. The last arrival. The last number in the list is .
Step 3. Why not join them as they come? Each packet could take a different route, and the routes are not equally fast. Joining in arrival order would give the pieces in the order , which is nonsense.
Step 4. When to reorder. The receiver waits until the last packet (packet ) has arrived. Then it sorts the packets by the packet number in each header and joins the payloads.
Check. Sorting gives , with no number missing.
Answer: (a) . (b) Packet . (c) The packets arrive out of order; they are reordered by packet number once the last one has arrived.
Log in to join the discussion.
Loading…