you do the opposite, you allocate what you need for cpu mining and the other are automatically used for anti-bottleneck
Basically on cpuminer you should be able to enter the number of threads. If you are cpumining and for some reason need to use it for other things aswell use less threads for cpumining.
I have a feeling you will be better off not even messing with CPU mining though as it tends to be unprofitable. So your likely causing headache for little/no gain.