106k views
5 votes
What function do you use to multiplex between many open file descriptors and choose one that is ready to read/write?

a) poll()
b) select()
c) epoll()
d) listen()

1 Answer

2 votes

Final answer:

The function used to multiplex between many open file descriptors and choose one that is ready to read/write is select().

Step-by-step explanation:

The function used to multiplex between many open file descriptors and choose one that is ready to read/write is select(). This function allows a program to monitor multiple file descriptors and determine which ones are ready for I/O operations. It takes three sets of file descriptors as arguments: the read set, the write set, and the error set. The program can then use these sets to determine which file descriptors are ready for reading or writing.

User Ismaran Duwadi
by
8.5k points