![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| IP Networking Learn TCP/IP, Internet Protocol, Routing, Routers, Network protocols in this UNIX and Linux forum. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| POLL function fails under AIX v5.3 | TahirNazir | AIX | 0 | 02-13-2008 11:15 PM |
| select/poll and Signal Safety | nopcoder | High Level Programming | 0 | 01-27-2006 11:35 AM |
| Replace select/poll with kqueue/kevent | bsderss | UNIX for Dummies Questions & Answers | 1 | 08-10-2005 01:14 PM |
| Quick Poll: Solaris IP Multipathing | kduffin | IP Networking | 3 | 12-05-2003 12:16 PM |
| How to convert the "select" function into a "poll" function | rbolante | High Level Programming | 1 | 07-10-2001 10:49 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
select vs poll
Hi,
Off late I had been looking at the differences b/w select() & poll() system calls. The requirement is to reduce the overhead, processor power in waiting for the data. In the kind of connections under consideration there would be very frequent data arriving on the sockets, so poll() fares well. But!!! Even in the few millisec when the data is not arriving, the application can do something better! So will select() be a better function to go for? In that case will there be any performance improvement at all? Instead, is there a scope for some kind of asynchronous call back functions where the appliction will just be initimated in case data arrives. On the whole, the requirement is that unnecessary waiting time should be cut & perfromance improved! If this is not the right forum, can somebody suggest the right one. Thanks in advance!!! |
|
||||
|
In many cases the choice is made for you.
If the system is BSD derived, then use select. In this case poll is merely a wrapper around select. If the system is System V derived, then use poll. In this case select is merely a wrapper around poll. The main advantage of poll is the number of file descriptors is not limited by the size of fd_set, other than that there is no real difference. Just because you can specify the time in microseconds or nanoseconds does not mean the OS will honour those, they are still limited by the system/heartbeat clock frequency. Last edited by porter; 04-27-2007 at 04:57 AM.. |
|
||||
|
Completion Ports
Hi,
I dont know which platform your are working on. But of the query, Quote:
Excuse me if the information is misleading/away from the topic... Thanks Srini |
|
||||
|
Hi,
Srinivasan: Thanks for the information. That was exactly something I was looking out for. Do you by any chance have any idea about how much performance improvement can be achieved by replacing poll with Asynchronous I/O framework. Porter: How do I check if my system is BSD derived or V derived? /smanu. |
|
||||
|
Quote:
|
|
||||
|
Quote:
1. STREAMS if has #include <sys/stream.h> it's SYS V 2. signals if it has sigblock & sigsetmask it's BSD, if sighold & sigrelse it's SYS V 3. terminal handling check prototype for "setpgrp()", if takes two args it's BSD But as systems have all adopted BSD sockets and merging to standardisation on posix compatibility it is more important to check the actual feature you are trying to use. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|