Re: In a multithreaded application,should no of processors be equal to no of threads ?



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.

.



Relevant Pages

  • [patch 2/2] x86 amd fix cmpxchg read acquire barrier
    ... There is no official AMD bug ID yet, but it seems to be reported in the field ... unsigned long prev; ... switch { ... LOCK_PREFIX " cmpxchgl %2,%0\n\t" ...
    (Linux-Kernel)
  • Re: minimizing bug
    ... >> my computer busy because this code only executes when it has nothing else ... Your *computer* is kept busy because the function ... Moreover there is a bug in .NET bug where Invoke can ... Without this Idle event the app minimizes ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: ListView and DisplayIndex
    ... >> Is it a bug in vb.net? ... > maximum index is 499. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • Why does Word 2003 change the Automatic Number formatting?
    ... document after I had saved the revisions/updates, ... I do not want Automatic Numbering ... Is this a bug in Word? ... Prev by Date: ...
    (microsoft.public.word.application.errors)
  • Re: Assert.Equals(obj,obj) fails with decimal parameters
    ... > This code should fail: ... > Does anybody have the same problem or is this bug just in my installation ... Prev by Date: ...
    (microsoft.public.vsnet.general)