Solved

IO Completion Port in Windows 2000

Posted on 2002-05-02
7
692 Views
Last Modified: 2013-11-15
Hi
  I am developing client/server application. Now I have one server based on IO completion port. ie,
using CreateIoCompletionPort and GetQueuedCompletionStatus. One thread accept socket connection and
other worker threads wait for IO Completion in GetQueuedCompletionStatus.


 In Windows 2000 there is new method named, BindIoCompletionCallback() for IOCP. It use thread pooling.

 So I can use any of the two methos, ie either CreateIoCompletionPort() or BindIoCompletionCallback().
Which is better. What are the advantages/disadvantages....

    If using CreateIoCompletionPort() function the thread count is usually No. of Processor * 2. What
about BindIoCompletionCallback(). Does system limit the number of threads that run same time ?.

    My server will run only on Windows 2000.

    And my final doubt is how IIS and other high-end servers handle Asynchronous IO.

Thanks
sisimon
0
Comment
Question by:sisimon
7 Comments
 
LVL 3

Accepted Solution

by:
job_s earned 350 total points
ID: 6985824
Hi Sisi,

Please see this link .One sample is also available on this page.


http://www.codeproject.com/internet/iocp.asp
0
 

Author Comment

by:sisimon
ID: 6985836

I already seen this document ,It only explain BindIoCompletionCallback(). Not compare with CreateIoCompletionPort().
0
 
LVL 3

Expert Comment

by:job_s
ID: 6985854
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:sisimon
ID: 6985863
Hi job_s,

   That document does not contain answer for my doubt..

Thanks
Sisimon
0
 
LVL 22

Expert Comment

by:ambience
ID: 6987849
BindIOCompletionCallback internally calls CreateIOCompletionPort passing it the FileHandle and the handle of an internal completion port.

The number of threads limits is the same with both functions howevere Bind** ensures that atleast one thread is available. Whereas with CreateIOCOmpletion you have to manage the threads yourself.

I say that Bind** version is better and easier to use, 'cause now the thread pool is managed by the system and not by you , the system dynamically shrinks or enlarges the pool size to cater for your requirements.

Using IOCompletionPort on the other hand is flexible enough , 'cause now the control is in your own hands, and as always a tradeoff between simplicity and flexibility.

0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7020541
hi sisimon,
Are you still looking for help with this question?

-- Dan
0
 
LVL 11

Expert Comment

by:griessh
ID: 7178463
Dear sisimon

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to split between

     "ambience and job_s"


If you think your question was not answered at all, you can explain here why you want to do this and post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: http://www.experts-exchange.com/commspt/


PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
Viewers will learn how to use the Hootsuite Dashboard.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now