Although not a direct answer to the OP's question, if you're having an issue with a particular process taking up too much of your CPU time, and making your computer unusable, and you don't mind how long that process takes to finish the task it's working on, you can use the
renice to alter the priority of that process, making it behave nicely (hence the name).
First, you need to find the PID of the process that's using up the CPU resources. You can either do that in Activity Monitor, or in Terminal.app with the
ps command - e.g. to find the PID of the Safari browser, type:
MacBook:~😈 ps -ef | grep Safari
501 17452 263 0 11:36pm ?? 4:15.60 /Applications/Safari.app/Contents/MacOS/Safari
The second line above is the output, and the PID is 17452 in this particular case.
Then, the next task is to change the priority of the process (let's say it's Safari we want to make behave nicely). To do this, in Terminal.app type:
MacBook:~😈 renice -n 10 -p 17452
-n option changes the nice level by adding 10 to the current value (0 by default). The range of values are -20 to 20, with lowest value meaning highest priority. As an ordinary user, you can use values 0 to 20. To assign a negative value, you need to have root privileges (e.g. use
sudo command). Read more about
renice by typing
man nice and
man renice in Terminal.app.
renice don't limit the percentage of the CPU available to a given application per se, they do however allow to change the scheduling priority, or in other words how much of the CPU time a process will get. This is all relative to the CPU load on your system, so if the system is under utilised, you most likely won't see any difference.