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

Related questions

asked Jun 4, 2024 104k views
Evgeny Goldin asked Jun 4, 2024
by Evgeny Goldin
8.1k points
1 answer
4 votes
104k views
asked Mar 20, 2024 111k views
Maxim Kolesnikov asked Mar 20, 2024
by Maxim Kolesnikov
8.9k points
1 answer
3 votes
111k views