Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Re: multicore cpu
April 12, 2009, 2:42 pm
rate this thread
Thank you for your replies,
Yes this particular program does utilize threads and threads::shared.
When the main code signals the worker thread to decode some large files
by setting a shared variable, the worker performs enough work to bring
cpu usage up to 50%, so it doesnt seem to utilize the additional core.
Reading up on the threads docs, it seems there is no way to explicitly
assign an affinity to a particular thread when it is launched.
I am thinking perhaps my Perl installtion might have been installed
incorrectly for utilizing multi-core cpu's?
C:\Documents and Settings\Admin>perl -v
This is perl, v5.8.8 built for MSWin32-x86-multi-thread
Binary build 822  provided by ActiveState http://www.ActiveState.com
Built Jul 31 2007 19:34:48
C:\Documents and Settings\Admin>ver
Microsoft Windows XP [Version 5.1.2600]
Re: multicore cpu
Looks like Microsoft OS. There is no guarantee of dual-core usage on multiple
threads. The first level is multiple-processes, still no guarantee.
Read up in Visual C docs on affinity programming.
My bet is that Perl lacks parameters inducing the default processor only,
no matter what.
- Xho Jingleheimerschmidt
April 12, 2009, 7:28 pm
- » FAQ 4.75 How do I define methods for every class/object?
- — Next thread in » PERL Discussions
- » How do I start and restart a program via a perl script?
- — Previous thread in » PERL Discussions