?
Solved

IO Completion Port in Windows 2000

Posted on 2002-05-02
7
Medium Priority
?
711 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 3

Accepted Solution

by:
job_s earned 1400 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This videā€¦
Suggested Courses

752 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