Re: multicore cpu

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Quoted text here. Click to load it

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 [280952] provided by ActiveState
Built Jul 31 2007 19:34:48

C:\Documents and Settings\Admin>ver

Microsoft Windows XP [Version 5.1.2600]


Re: multicore cpu

On Sun, 12 Apr 2009 14:42:39 GMT, wrote:

Quoted text here. Click to load it
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.


Re: multicore cpu wrote:
Quoted text here. Click to load it

You start *one* worker thread.  It uses *one* CPU.

What is the point of having one worker thread?  If there is only to be
one, why not just have the main thread do the work itself?

Quoted text here. Click to load it

An affinity for what?


Re: multicore cpu


Quoted text here. Click to load it

In Microsoft OS you can asign an affinity (the tendency to use) when you start
a process, or can be assigned via the registry, set from explorer shell, proxied
on your behalf, to use a particular core or single core, in a dual/quad-core


Site Timeline