Example: Unix Select Syscall
A thread/process with multiple network connections or open files can initiate nonblocking I/O on all of them.
The Unix select system call supports such a polling model:
- files are identified by file descriptors (open file numbers)
- pass a bitmask for which descriptors to query for readiness
- returns a bitmask of descriptors ready for reading/writing
- reads and/or writes on these descriptors will not block
Select has fundamental scaling limitations in storing, passing, and traversing the bitmaps.