Using python 3.8.8 on a windows box, how to determine the maximum number of processes that can be run per CPU core? I followed some previously asked related questions like 1,2,3,4.
Now the python docs on this subject suggest to use len(os.sched_getaffinity(0))
. However, when I try in code, it returns an error,
import os
print(len(os.sched_getaffinity(0)))
AttributeError: module 'os' has no attribute 'sched_getaffinity'
Then I try another code snippet to identify the available functions,
import os
print(dir(os))
and it gives me a list of functions wherein sched_getaffinity()
is not available.
My environment is:
- Windows 10 64-bit
- Python 3.8.8
- 8 core processor