I'm running a fairly resource intensive program. My machine has two processors. It runs Mac OS X. My program is doing multiprocessing using OpenMP. If I look in top/htop, it IS using more than 100%, but it is usually around 130%. If I add up the top few numbers, the sum is nowhere near 200%. Why doesn't my program use the rest? Or is the rest being used implicitly somewhere?
Without knowing the program in question, one can still at least say that the threads are waiting for something part of the time - most likely for a lock to be freed or for I/O operations to complete.
Ok, but that's what I'm saying. I know the OS needs a bunch of CPU. But that would show up in top as Xorg, or HAL, or DBUS, or whatever. But the SUM of all the things doesn't add up to 200%.