Re: Multi processing
Igor Tandetnik wrote:
The OS will automatically schedule your threads to run on different CPUs
whenever possible. You don't need to do anything special.
I am well versed with multi threaded single processor scenario. How
different it would be to have multi threaded running on multi
processor.
From the programmer's point of view, one major difference is that all
the synchronization bugs you might have in your code are much more
likely to manifest. Correct code with proper locking won't have any
problems.
Igor:
I was going to give this answer, more or less, but then I thought the OP
maybe knew this, and wanted to know how (or if) he could control which
threads were on which processor. For example, if you have many
concurrent threads, and you know that only some of them require
significant processing time, you would want those threads to be on
different processors as much as possible, while for the others it does
not matter. The OS does not have this knowledge.
David Wilkinson