|
-
January 10th, 2009, 03:44 PM
#1
threading question
hi guys I have a function that does almost all the work I need to be done the thing is I need the same work done for 4 different classes (sets of data) luckily I have a core quad processor so I thought to spread the work on the 4 different processors (makes sense). so I used "_beginthreadex " procedure and created 3 threads foo1 foo2 foo3 that in their body calls this key function (same function) with different input parameters, so I'd expect the CPU usage to go to 100% (like 25% for each thread i.e. a core for each thread) but when I run the task manager my executable only takes 25% of the CPU usage denoting that only one core is being used and the 4 threads (main and the foos) are running serially on one core :S, why is this happening?? is it because all threads are using the same code?? i.e. same instruction memory so they can't be parallelised??
any help is appreciated
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|