4 ms·
I'm not a kernel expert, but to my understanding it works in a following way: kernel have threads which e. g. process incoming TCP/UDP packets or send outgoing
by citrin_ru 6y ago
I'm not a kernel expert, but to my understanding it works in a following way: kernel have threads which e. g. process incoming TCP/UDP packets or send outgoing traffic. When such thread detect 'interesting' event, e. g. incoming data was saved into a buffer for a TCP connection it send a notification which cases user-space threads to wake up from a sleep and process an event.
There is always a polling in at least one place - a kernel scheduler, but the scheduler generally doesn't care if sync or async IO is used (with sync IO schedule has more work, because there are more threads/process for same number of connections, but operation principles are the same).