views:

48

answers:

1

Hi Folks,

How can I assign processes to specific cores ?. I have a 16 core machine and need to assign processes to multiple cores rather then all/few of them running on same cores.

Can Parallel::ForkManager do this ?. or How do you do it with using standard perl distribution ?

Any pointers are appreciated.

Thanks

+5  A: 

Under Windows, you can use Win32::Process, it has a subroutine called SetProcessAffinityMask, which should do what you want.

Under Linux, take a look at Sys::CpuAffinity.

ar
`Sys::CpuAffinity` also works for Windows.
mobrule