Solved

IO Completion Port in Windows 2000

Posted on 2002-05-02
7
699 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

733 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