Skip to content

one cpu full, but show 200% ? #1204

@baiwfg2

Description

@baiwfg2

OS: Linux fedora 5.15.16-100.fc34.x86_64 #1 SMP , running on virtualbox with 2 CPUs
htop version : 3.2

I have a simple program:

#include<stdio.h>
int globalv;
void dosth()
{
  globalv++;
}
int main()
{
  globalv = 0;
  for(;;)
    dosth();
  return 0;
}

When I run it, it definitely consume one core , but why htop show 200% usage ?

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    question ❔Further information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions