19.8k views
0 votes
Assume that a computer wants to send a message 932,430 bytes long. the computer sends the message packet by packet across a reliable connection using the stop-and-wait protocol.

each packet has a header that is 20 bytes long and a payload of 256 bytes.

Number of Packets

Calculate the minimum number of packets that need to be sent to transmit the entire message (assuming no packet loss).

User Dhilmathy
by
7.7k points

1 Answer

1 vote

Final answer:

The minimum number of packets required to send a 932,430-byte message with a packet structure of a 20-byte header and a 256-byte payload using the stop-and-wait protocol is 3643 packets.

Step-by-step explanation:

To calculate the minimum number of packets needed to send a message of 932,430 bytes using the stop-and-wait protocol with a 20-byte header and a 256-byte payload, we must divide the size of the message by the payload size of each packet.

The packet payload is 256 bytes and each packet carries a 20-byte header. Therefore, the total size that can be sent in one packet is 256 bytes. To find out how many packets are needed to send the entire message, we divide the size of the message (932,430 bytes) by the payload size (256 bytes).

Minimum number of packets = Ceiling(932,430 / 256) = Ceiling(3642.6171875) = 3643 packets.

Since a partial packet still requires one full packet to be sent, we always round up to the next whole number, thus 3643 packets are required to send the full message.

User Mirhossein
by
7.8k points