Re: Detecting CPUs and cores
- From: Twisted <twisted0n3@xxxxxxxxx>
- Date: Tue, 31 Jul 2007 05:08:22 -0000
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.
.
- References:
- Detecting CPUs and cores
- From: Chris
- Re: Detecting CPUs and cores
- From: Joshua Cranmer
- Re: Detecting CPUs and cores
- From: Daniel Dyer
- Re: Detecting CPUs and cores
- From: Lew
- Re: Detecting CPUs and cores
- From: Eric Sosman
- Detecting CPUs and cores
- Prev by Date: Re: Problem reading " & apos; " from XML using SAX Parser
- Next by Date: Re: RMI Problem
- Previous by thread: Re: Detecting CPUs and cores
- Next by thread: Re: Detecting CPUs and cores
- Index(es):
Relevant Pages
|