2 ms·
Your assuming this uses more cycles, but that's probably false. All the interrupts, context switches, and kernel processing related to IO is a lot of processing
by eloff 11y ago
Your assuming this uses more cycles, but that's probably false. All the interrupts, context switches, and kernel processing related to IO is a lot of processing. You have control here how many cycles to burn busy waiting, it's the classic latency vs throughout tradeoff. Longer sleep times in between polling means less busy waiting and more latency.