I/O Interfaces & Buses

Which is most effective for speeding up a program that exchanges thousands of small pieces of data with a device one at a time?

  1. AOnly switch to a link generation with twice the bandwidth
  2. BBatch the data into large chunks to reduce the number of exchanges
  3. CSplit each piece into even smaller parts
Show answer and explanation

Answer: B. Batch the data into large chunks to reduce the number of exchanges

Each small exchange incurs latency and software overhead while leaving the bandwidth mostly idle. Sending the data together in one go pays latency fewer times and uses the bandwidth effectively. Storage and networking use the same idea widely, for example by queuing several requests and submitting them at once, or by coalescing interrupts.

  • A. With small data latency dominates, so the gain is small.
  • B. Correct. Latency is paid fewer times.
  • C. More exchanges make it even slower.
Practice this topic Back to topic

More I/O Interfaces & Buses questions

  1. Which statement about how USB communication works is correct (for conventional USB, excluding USB4)?
  2. Which statement about USB Type-C is correct?
  3. Which describes USB Power Delivery (USB PD)?
  4. Among USB transfer types, what is characteristic of isochronous transfers?
  5. Which describes hot plugging, supported by USB and some PCI Express setups?