2

I am running a program and the developer of the program, whom I know personally, tells me that the program is completely single-threaded. However, as you can see in the picture below, the program is actually using all my cpu cores. Thus, I would like to know why this is the case. Is it possible that depending on the program, windows can still run a single-threaded program in more than 1 core? I know that the question sounds silly but I couldn't find a better way to phrase it.enter image description here

1
  • It might help to have a broad overview of what the program is doing, as it could be using system facilities or other programs that are multithreaded.
    – Mokubai
    Commented Oct 6, 2021 at 6:33

1 Answer 1

1

It is not using all cores simultaneously, it is simply being stopped by the operating system and when restarted it is being scheduled on a different core.

A single threaded program can only run on one core at a time, but as part of multitasking operating system hundreds of programs and tasks are being constantly stopped and started and to the user what core gets used for what program will look essentially random.

Your program can run on any core that is available, what it can't do is run on multiple cores at the same time.

Those graphs are not precise enough to show individual CPU time slices.

If the developer assures you that it is a single threaded program then there is something else going on. Either he is using some library or loader that is multithreaded, or something else is making use of your system at the same time.

2
  • Can you explain more why you know that the program os not using all cores simultaneously? To my eyes, all cores are working hard. Btw, this is the only program my pc is running and when it is closed, all the graphs above just flatten out. Commented Oct 6, 2021 at 16:54
  • Just because "all cores are working hard" does not mean all cores are working hard on that task. Without seeing the amount of CPU on the "processes" tab, and if the task has multiple processes in it we can only trust the developer. It's entirely possible that if the program is doing a lot of file reading then your CPU is spending more time on virus scan than actually working on your one task.
    – Mokubai
    Commented Oct 6, 2021 at 18:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .