← BYTES
Unix IPC·Starter·Ref: 15.1.41

Why would a server program want to wait on many open connections (file descriptors) at once, rather than handling them one at a time?

Have a question about this video? Mention reference 15.1.41 when you contact us.

a.So one program (even a single thread) can efficiently serve many simultaneous clients, instead of blocking on one connection while others sit idle waiting to be noticed
b.To use more disk space per connection
c.To make each individual connection run faster
d.To avoid needing an operating system at all
I/O multiplexing exists so a server can efficiently handle many connections concurrently without dedicating a full blocking thread to each one, or wastefully spinning in a loop checking each connection in turn -- it lets the OS tell the program which connections actually have something to do.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES15141#UnixIPC