0
$\begingroup$

Here http://tomstechnicalblog.blogspot.com/2016/02/rxjava-understanding-observeon-and.html I've found a sentence which I do not understand:

If you have a quad-core, you can optimally support 5 computational threads (4 cores + 1 extra thread for idle time).

What is that 1 extra thread for idle time for? Is it similar to those "normal" 4 cores?

$\endgroup$
  • $\begingroup$ The idea is to always have a thread waiting to use a CPU should one become free (because a thread blocks). This is just a crude rule of thumb, it will obviously depend on the ratio of running time/total time of the threads. $\endgroup$ – vonbrand Feb 15 '16 at 18:13
1
$\begingroup$

What I think they mean is that while you only have 4 cores to do computation on sometimes they will halt, pause, or "idle". When they do that the OS will run another thread on that core. As such you should be able to have 1 more thread to fill in the periods where a core is not doing anything.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.