why does an infinite loop of the unintended kind increase the CPU use? -


I know that the infinite loop for unexpected type usually causes higher CPU usage. But, I do not quite understand why anyone can explain to me?

The CPU can not do anything else while executing that loop (which never ends). Even if you are using a pre-emptive multi tasking system (so that the endless loop will always only stop its process or thread), then every time the pre-amputate scheduler of the OS is able to "eat" The CPU will not eat anything for the next piece, but by consuming each piece of each piece of CPU at all times, so the CPU is lost to all the other threads, which A Neither is doing useful work. / P>


Comments