Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Setting CPU Affinity

Reply
Thread Tools

Setting CPU Affinity

 
 
Laughlin, Joseph V
Guest
Posts: n/a
 
      05-03-2004
When I spawn a new process via spawnv(), how can I set the CPU affinity
for the newly-spawned process with python?

Thanks,

Joe Laughlin
Phantom Works - Integrated Technology Development Labs
The Boeing Company




 
Reply With Quote
 
 
 
 
Mark Hammond
Guest
Posts: n/a
 
      05-04-2004
Laughlin, Joseph V wrote:
> When I spawn a new process via spawnv(), how can I set the CPU affinity
> for the newly-spawned process with python?


The pywin32 (win32all) extensions include the win32 functions for this
in the win32process module. You should be able to:
* use spawmv to get the new process ID.
* use win32process.OpenProcess() to get a process handle.
* use win32process.SetProcessAffinityMask() to set the affinity.

Mark.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
setting the CPU affinity for a whole JVM on Linux alexandre_paterson@yahoo.fr Java 3 01-28-2009 09:50 PM
System Process CPU Affinity on 64-bit O/S Ged Windows 64bit 5 04-13-2006 05:00 PM
How to maintain affinity in webgarden (multi CPU)? SevDer ASP .Net 1 01-30-2006 03:48 AM
Windows multi-CPU "Set Affinity" can this be applied as a saved setting? Atreju Computer Support 10 08-18-2005 03:25 AM
RE: Setting CPU Affinity Laughlin, Joseph V Python 0 05-04-2004 07:50 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57