On Wed, Sep 28, 2016 at 2:13 AM,  <jf...@ms4.hinet.net> wrote:
> If the load was distributed by the OS schedules across all cores,
> does it means I can't make one core solely running a piece of codes
> for me and so I have no contol on its performance?

In Unix, Python's os module may have sched_setaffinity() to set the
CPU affinity for all threads in a given process.

In Windows, you can use ctypes to call SetProcessAffinityMask,
SetThreadAffinityMask, or SetThreadIdealProcessor (a hint for the
scheduler). On a NUMA system you can call GetNumaNodeProcessorMask(Ex)
to get the mask of CPUs that are on a given NUMA node. The cmd shell's
"start" command supports "/numa" and "/affinity" options, which can be
combined.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to