4 ms·
I didn’t understand the need for a multi-threaded version of cat. File reading/writing is a sequential thing, right?
by fractalb 5y ago
I didn’t understand the need for a multi-threaded version of cat. File reading/writing is a sequential thing, right?
- kreeben 5y agoAFAIK operating systems delegate reads/writes to their IO subsystem. This subsystem can optimize the IO operations by scheduling them in an order that differs from when they arrived to the IO queue and this improves performance in some cases. Instead of FIFO the subsystem operates on the segment of your storage device that is closest to its current location. Modern IO subsystems are both thread-safe and smarter than the average programmer.