When I run a simple C # program with an empty while loop, my CPU usage increases from 8-12% to 24-20%, and the main usage pattern is almost identical.
static void Main(string[] args)
{
bool flag = true;
while(flag)
{
}
}
Can anyone explain this behavior. I expected that one main use would be 100% at this time.
Update: I am using an octa-core machine, and the total processor utilization (summing up all core resources) is 25%. And each core (leaving the first) shows a similar usage pattern (about 25%).

source
share