Solved

IO Completion Port in Windows 2000

Posted on 2002-05-02
7
697 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
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…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

829 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