I want to know how to distribute N independent tasks to exactly M processors on a machine that has L cores, where L>M. I don\'t want to use all the processors because I sti
You might want to look into the following package:
http://pypi.python.org/pypi/affinity
It is a package that uses sched_setaffinity and sched _getaffinity.
The drawback is that it is highly Linux-specific.