• Welcome to Valhalla Legends Archive.
 

Overlapped I/O vs. I/O Completion Ports

Started by Mephisto, December 30, 2004, 02:46 AM

Previous topic - Next topic

Mephisto

Can someone please explain to me the fundamental differences between these two concepts and where each should be applied and if possible provide resources for both.  I have a vague understanding of I/O completion prots and rudimentary knowledge of overlapped I/O; enough to be able to develop small-scale applications such as a Battle.net bot which connects to Battle.net and processes and sends messages using it.

Mephisto

Hmm, was rather hoping some people would've commented on this by now.  Am I the only one who wants to know about these subjects?  I know there's people on these boards with knowledge pertaining to these two subjects (Kp, Skywing, ...).  Can you guys please share your input?  Sorry if I'm rude by being persistant on this, but I'd really like to know, and the internet doesn't seem to provide a lot of clear examples about completion ports, though I may be searching poorly.

Btw, I apologize for this subject being in the wrong place, but it was an accident for posting it here (I meant to post it in the C++ board); but regardless, it does pertain to here to some extent...and that doesn't take away the importance of these two subjects.  *blah*

dxoigmn


Skywing

Completion ports are more efficient than compleletion routines, but there is absolutely no support for them on Win9x.

Completion routines are implemented with the standard APC queuing mechanism.  Completion ports are implemented as a queue in kernel mode that is specially optimized for fast retrieval of events by multiple threads.

UserLoser.

Quote from: OnlyMeat on January 04, 2005, 02:29 PM
I looked into using them for my client apps but decided they are more suited for multithreaded tcp/ip servers.

Thats not to say they cant be used for clientside stuff but i prefer to use the WSASelectEvent API's mainly because it does the same job and i dont like restricting my users to the newer OS versions.

"Them" being?

Mephisto

So would my application's performance benefit from using completion ports instead of completion routines?  What are your recommendations when writing clientside software.

MyndFyre

Quote from: Mephisto on January 04, 2005, 04:39 PM
So would my application's performance benefit from using completion ports instead of completion routines?  What are your recommendations when writing clientside software.

If what I read yesterday from a Google search was accurate (my post having been deleted), I don't believe you'll get much more than a minimal gain from it when your software is running on NT, because the routines are really just ports "under-the-hood" (in the kernel).  And since they're (ports) not available on 9x (as Skywing said), why not just go for routines?
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Mephisto

Overlapped routines work fine on Win9x; they use the APC queueing method (as Skywing pointed out).  So I'm not sure if your source is entirely accurate (though it may be, perhaps you misunderstood it).