Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is multithreaded large-scale synchronous I/O multiplexing using select() possible?

I know I don’t need multiple threads for this, but I like to know if multithreading is possible?

I checked internet and people suggest there is no need for multi threading.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Yes, it is possible to use the select() function for multithreaded large-scale synchronous I/O multiplexing. The select() function is a system call that allows a program to monitor multiple file descriptor sources for events, such as data available to be read or space available to write data. It can be used to monitor multiple file descriptors in a single thread, allowing the thread to perform multiple I/O operations concurrently.

Using the select() function for multithreaded large-scale synchronous I/O multiplexing can be a good choice in certain situations, particularly when the program needs to scale to a large number of file descriptors and performance is a concern. However, there are some limitations to using select() that you should be aware of:

The select() function can only monitor a maximum of 1024 file descriptors on some systems, and this limit may be lower on other systems. This can be a problem if you need to monitor a large number of file descriptors.
The select() function is not efficient at handling a large number of file descriptors, as it requires the program to iterate over all of the file descriptors to check for events. This can lead to poor performance when monitoring a large number of file descriptors.
There are other alternatives to select() that you may want to consider if you are looking to perform multithreaded large-scale synchronous I/O multiplexing, such as the epoll() function or the poll() function. These functions can be more efficient at handling a large number of file descriptors, but may not be available on all systems.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading