XP/VW 7.4: Which CPU-core?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

XP/VW 7.4: Which CPU-core?

John Treble


Is there any way for my VW application to determine which CPU-core it's
running on?  I know I can set this manually (at least initially) with XP's
"Processor Affinity" tool but I would like to know if and when this changes.



John Treble
Ottawa, Canada



Reply | Threaded
Open this post in threaded view
|

Re: XP/VW 7.4: Which CPU-core?

Reinout Heeck-2
Hi John,

I know we have a call to set the processor affinity mask, see here.
to read the current affinity mask see here
If you have windows 2003 or Vista you can use the following call
to get the processor number is was running on.

All calls related to threads and processes can be found here.
I hope this helps,

Cham

John Treble wrote:
Is there any way for my VW application to determine which CPU-core it's
running on?  I know I can set this manually (at least initially) with XP's
"Processor Affinity" tool but I would like to know if and when this changes.



John Treble
Ottawa, Canada




  

Reply | Threaded
Open this post in threaded view
|

Re: XP/VW 7.4: Which CPU-core?

Runar Jordahl
In reply to this post by John Treble
What I found was that many running VisualWorks images are properly
scheduled by Windows XP. For example, if you have three images and any
 two are running, both cores seems to always be used:
http://www.cincomsmalltalk.com/userblogs/runarj/blogView?showComments=true&entry=3334319381

So I guess you can ignore the whole issue of determining which core an
image runs on.

Reply | Threaded
Open this post in threaded view
|

RE: XP/VW 7.4: Which CPU-core?

John Treble
In reply to this post by Reinout Heeck-2

Snip...
> I know we have a call to set the processor affinity mask, see here.
Snip...


Cham,

Thanks for the info:  Set/GetProcessAffinityMask looks like it will work.

John Treble




Reply | Threaded
Open this post in threaded view
|

RE: XP/VW 7.4: Which CPU-core?

John Treble
In reply to this post by Runar Jordahl


> What I found was that many running VisualWorks images are properly
> scheduled by Windows XP. For example, if you have three images and any  
> two are running, both cores seems to always be used:
> http://www.cincomsmalltalk.com/userblogs/runarj/blogView?showComments=
> true
> &entry=3334319381
>
> So I guess you can ignore the whole issue of determining which core an
> image runs on.


Runar,

Interesting info.  At this point I'm just taking an existing application and
trying to make it cluster/DST aware.  I'm not sure I will be using the
CPU-core information in the end.

John Treble  


Reply | Threaded
Open this post in threaded view
|

Re: XP/VW 7.4: Which CPU-core?

Reinout Heeck-2
John Treble wrote:

>
>> What I found was that many running VisualWorks images are properly
>> scheduled by Windows XP. For example, if you have three images and any  
>> two are running, both cores seems to always be used:
>> http://www.cincomsmalltalk.com/userblogs/runarj/blogView?showComments=
>> true
>> &entry=3334319381
>>
>> So I guess you can ignore the whole issue of determining which core an
>> image runs on.
>
>
> Runar,
>
> Interesting info.  At this point I'm just taking an existing application and
> trying to make it cluster/DST aware.  I'm not sure I will be using the
> CPU-core information in the end.
>

We found it helpful to 'attach' different images in our system to a CPU
for debugging purposes, the graphics in the task manager then nicely
shows you which images are active at a given time.

In deployment it is probably best to let the system assign CPUs to tasks.

R
-