Re: In a multithreaded application,should no of processors be equal to no of threads ?
- From: "RichT" <rricht@xxxxxxxxxxx>
- Date: 7 Nov 2005 13:23:58 -0800
To use up all the processors in your box, you need at least as many
threads as processors. Beyond that, it depends on how your application
is structured.
Having more threads than processors will not cause your application to
core dump (unless, of course, there is a bug in it ;)). If more
threads are ready to run that you have processors, some threads will
wait.
Do not think about how the threads are going to be scheduled. For
example see the previous discussion on fairness. A simple approach is
make the number of threads a parameter and then see how many threads
are needed to keep the box busy.
.
- References:
- In a multithreaded application,should no of processors be equal to no of threads ?
- From: nagaraj_hayyal
- In a multithreaded application,should no of processors be equal to no of threads ?
- Prev by Date: Re: No synch timeouts
- Next by Date: Re: pthread_create allocates 10 MB per call
- Previous by thread: In a multithreaded application,should no of processors be equal to no of threads ?
- Next by thread: Re: In a multithreaded application,should no of processors be equal to no of threads ?
- Index(es):
Relevant Pages
|