views:

138

answers:

2

Does the threads of a single process run in parallel on a multi-core machine on windows XP? Is the behavior same on different windows versions (windows server editions)

I have heard that only threads of different processes run in parallel.

+6  A: 

Threads within the same process can still run in parallel on a multi-core machine. This should be the case for all editions of Windows capable of running .NET.

Where did you hear that only threads in different processes can run in parallel? Treat that source of information with a huge amount of salt in future (after checking that that's what they really said, and you didn't misunderstand).

Jon Skeet
It may be the source said "only threads on different processors can run in parallel" which would make more sense.
paxdiablo
@paxdiablo: Marginally more; we've had multi-core processors for quite a while and Windows didn't have much problems with them.
MSalters
I usually count a dual core as two procesors. Perhaps I should have said you can only have as many (truly) concurrent processes as there are execution units (cores, processors, whatever you've got).
paxdiablo
A: 

Yes, they may run in parallel. Of course you can't count on any specific behavior wrt processor allocation and/or interleaving, since it depends on the whims of the scheduler and what else is running, etc. ...

Max Strini