Up until now all my apps have been single threads but now I would like to get into multi threading. I know most of the ideas between creating and managing your own threads and putting it up in a pool and letting the OS handle it. I know that in a thread pool 1 thread/processor can run. My question is lets say for example I use Nero to make a DVD compilation. On a 1 core it takes about 3 hours. Now if you have 2 cores then it takes about 1.5 hours and so on with the time cut in half for the number of cores. So what kind of threading is this. Is it a single thread that the OS has put the cores to work? Is it a threaded pool and the OS is distributing the workload between cores?
Thank you,
{KJ}
Loading
KaktusJackPosted Jun 20, 2011, 2:37 AM
VulpesPosted Jun 16, 2011, 5:11 AM
KaktusJackPosted Jun 15, 2011, 11:06 PM
Good day to you!! Haven't spoken with you in awhile!
So if I have a [STAThread] it is/will only run on 1 core at a time and the OS wont switch the cores during the interupt process? (not that it matters much)
And I'm not to certain about Nero splitting up the thread(s) because when you start the DVD conversion it has to do all the processing to convert it which means, with your suggestion, that isn't possible. Again I haven't a big clue about multi-threading but logic says that "convert movie.avi to movie.vob and such" has 1 long process. Only thing I can think of is that it has a different thread for each .vob file or something. Would love any ideas people would have as to narrow this down a bit. Another example would be what if I was zipping and then encrypting a big file, say 1.75GB. How could I use multi-cores to do the job in less time?
Thanks again Vulpes as always,
{KJ}
VulpesPosted Jun 15, 2011, 6:02 AM