views:

175

answers:

3

Do current architectures provide support for running the same single thread on multiple cores of a single system? What kind of issues would be involved in such a situation?

+2  A: 

Not that I know of.

A thread can be stopped an started again on a different core but a thread in and by itself can not run parallel.

If you have code in a thread that could run parallel, you should split it up in two threads.

Lieven
+2  A: 

This would actually slow down the thread. Every time a thread switches cores, all the state of the previous core needs to be transfered. Ideally a thread would stay on one core.

What advantages are you thinking will come from running on multiple cores?

Kousha
A part of the thread's operations like IO which may cause a stall on one core on which it is running, can be executed in parallel on another core. This would help to leverage performance of multi core systems.
Aastha
+1  A: 

Nope, I don't think there exists such a thing..

J. Vermeire