Which is more costly in terms of performance: a few threads with many context switches or many threads with few context switches?

33 views Asked by At

Which is more costly in terms of performance: a few threads with many context switches or many threads with few context switches?

Assuming that the CPU can process one thread at a time:

In Case 1 with 3 threads and 300 context switches, each thread is context switched an average of about 100 times,

In Case 2 with 300 threads and 1 context switch per thread, the total number of switches is also 300.

So which one is more performance-intensive?"

0

There are 0 answers