Re: Detecting CPUs and cores



On Jul 31, 12:35 am, Patricia Shanahan <p...@xxxxxxx> wrote:
Eric Sosman wrote:

...

The differences make a difference -- but taking proper account
of them is far more involved than simply counting cores or chips.
You need to get into the architecture of what's shared and what
isn't, which components can run in parallel and to what degree,
and so on. This is well outside the scope of what cross-platform
Java is equipped to handle; one would need a lot of supplementary
information to make sense out of whatever number one obtained.

A programmer may have determined experimentally that two threads running
on different cores get significantly more throughput than one, but that
the same two threads running hyper-threaded get less throughput than
one. The program is written so that the number of threads is a free
parameter.

The program should limit the number of threads to be no more than the
number of cores, but cannot because it cannot tell the difference
between two separate cores and a single hyper-threaded core.

Actually, it's the responsibility of the OS (or maybe the VM) to
schedule threads in such a way as to maximize throughput, modulo
thread-priority semantics anyway.

.



Relevant Pages

  • Re: Detecting CPUs and cores
    ... the same two threads running hyper-threaded get less throughput than ... number of cores, but cannot because it cannot tell the difference ... I haven't personally benchmarked the effect of Hyper-Threading but, if your application is relying on the result of availableProcessorsto fine tune it's concurrency strategy, it's important to be aware that 1 HT CPU may behave quite differently from 1 dual-core CPU. ...
    (comp.lang.java.programmer)
  • Re: Detecting CPUs and cores
    ... throughput than on one of those "cores". ... The reason Intel provided hyperthreading is that it increases throughput on the chip. ...
    (comp.lang.java.programmer)
  • Re: Detecting CPUs and cores
    ... Lew wrote: ... the same two threads running hyper-threaded get less throughput than ... number of cores, but cannot because it cannot tell the difference ... benchmarks that they simulate during processor design. ...
    (comp.lang.java.programmer)
  • Re: Detecting CPUs and cores
    ... Patricia Shanahan wrote: ... the same two threads running hyper-threaded get less throughput than ... number of cores, but cannot because it cannot tell the difference ... The reason Intel provided hyperthreading is that it increases throughput on the chip. ...
    (comp.lang.java.programmer)
  • Re: Microblaze performance in V6
    ... MicroBlaze works fine in V6 and has so for some time now. ... However BSB will not generate V6 or S6 systems yet since the cores ... architecture to S6 or V6. ... in the EDK, ...
    (comp.arch.fpga)