0

For years, I had the impression that a single process can only use at most one core of the CPU, but recently I found two examples where a single process used all the cores of a multi-core Windows system.

One of them is easy to test for most people: http://fitgirl-repacks.site/donate-by-mining/

Disabling the multi-process function of your browser, the setting "CPU threads" on the web page is still effective. You can see the single browser process using all your CPU cores.

Why does this happen only sometimes while most of time it does not (so many programs spawn several processes to try to take advantage of the multi-processor system)?

1

2 Answers 2

1

A program can be written to make use of multiple threads, thus allowing them to use more than one core.

A program can also be written to split itself into distinct processes, each with one or more threads to work.

There is a very subtle but real difference between multi-thread and multi-process. Disabling the multi-process functionality does not disable multi-threading, which was already present.

The recent browser updates to allow multi-process functionality enhances security and crash tolerance by separating threads for separate pages into their own process, each of those processes can still have multiple threads, all working independently.

0

There are several ways a single process can use more than one core.

The most obvious way they can do is by creating multiple threads of execution. Each thread can be scheduled on a core to provide direct use of more than one core by a single process.

But there are also other ways a single process can use more than one core. For example, a process can make requests from operating system services that are internally able to use more than one core. For example, a process that does a lot of disk I/O might be running on one core as another core, running operating system code, complete one of the disk I/O operations that process initiated. Network and graphics operations can similarly be internally implemented in ways that use more than one core.

You must log in to answer this question.

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