CS FundamentalsHardProduct-company placement
A client writes a 50-byte header and then a 200-byte body to a TCP socket as two separate write() calls, then waits for the reply. Nagle's algorithm is on at the client and delayed ACKs are on at the server. What typically happens?
- A. Both writes are sent at once because they fit in one MSS
- B. The body waits until the server's delayed ACK for the header arrives, adding up to the delayed-ACK timeout to each request
- C. The server discards the header because it is smaller than the MSS
- D. Nagle sends the body first since it is larger
Correct answer: B. The body waits until the server's delayed ACK for the header arrives, adding up to the delayed-ACK timeout to each request
Nagle holds small data while earlier data is unacknowledged, and the server delays its ACK hoping to piggyback on a reply it cannot produce without the body. The deadlock lasts until the delayed-ACK timer fires; the fix is one write (or TCP_NODELAY).
More Computer Networks questions
- A page has a base HTML file and 6 small embedded images on the same server. The RTT is 20 ms and transmission times are negligible. With…
- The bit string 10111001 is sent once with NRZ-I (a level transition at the start of every 1 bit, none for a 0, counting the transition at…
- A token ring has a circumference of 2 km, 50 stations each adding a 1-bit delay, a data rate of 16 Mbps and a signal speed of 2 × 10⁸ m/s…
- Wireless host H sends an IP datagram to a server on the Internet. H is associated with access point AP, which is bridged to an Ethernet…
- A binary code has length 10 and must correct every single-bit error. What upper limit does the Hamming (sphere-packing) bound place on the…
- A 7-bit cyclic code uses the generator x³ + x + 1. Bits are indexed by powers of x, from x⁶ (leftmost) down to x⁰ (rightmost). A received…