Basically, I will be running two tasks concurrently on Windows XP, one will be very large (needing a whole core), and the other will be very small, and could easily run with the OS. The exchange between the tasks is an array, one basically formats the current array while the other processes the next array.
If I simply multithread my code (using the windows.h CreateThread() function), will Windows be smart enough to break up my program into the separate threads and distribute them across both cores? Will it always try to optimize the distribution of threads, or is there a way I can specify which core to run each thread on?
Or, if it won't break up my program automatically, would I be better to create processes instead of threads? Would that ensure that Windows could break up the tasks?
Question
A4B4
Basically, I will be running two tasks concurrently on Windows XP, one will be very large (needing a whole core), and the other will be very small, and could easily run with the OS. The exchange between the tasks is an array, one basically formats the current array while the other processes the next array.
If I simply multithread my code (using the windows.h CreateThread() function), will Windows be smart enough to break up my program into the separate threads and distribute them across both cores? Will it always try to optimize the distribution of threads, or is there a way I can specify which core to run each thread on?
Or, if it won't break up my program automatically, would I be better to create processes instead of threads? Would that ensure that Windows could break up the tasks?
Thanks in advance!
Link to comment
Share on other sites
2 answers to this question
Recommended Posts