A server with thousands of mostly idle connections should not have to resubmit and rescan thousands of descriptors on every wait. Modern operating systems provide scalable I/O notification facilities that keep registration state in the kernel and return the events or completions the application needs to process.
The major platform families expose different APIs:
epoll.kqueue.These names are often grouped together as high-concurrency I/O mechanisms, but they do not all follow the same model. epoll and socket filters in kqueue normally report readiness: an operation can probably make progress without blocking. IOCP normally reports completion: an asynchronous operation submitted earlier has finished.
That distinction affects application state, buffer ownership, cancellation, and worker design. This chapter develops the mental model for all three and builds a portable Python echo server that uses epoll on Linux or kqueue on BSD/macOS without a framework.