This is a question for both UNIX-like OSs and Windows.
When I issue a buffered write, will it consume process time to actually write the data to the disk?
Say, I have a long-running processor-heavy task, which will write the temporary results to the disk from time to time. This will go to a temporary buffer somewhere first. Later, due to some policy, the data from the temporary buffer will be moved to the disk. At the time this happens, will the processor stop for the buffer -> disk transfer, or will it only stop to setup a DMA transfer and the processor-heavy main task will never be interrupted?
run(processor heavy task)
write_buffered(partial results)
...
flush_buffer_to_disk(partial results) -> will this slow down the processor heavy task?
NOTE: We are NOT hitting the buffer limit, the disk bandwidth is enough to write partial results to the disk.