This is from "sysctl -a | grep cpu":
hw.ncpu = 4
hw.cpufrequency = 2500000000
hw.availcpu = 4
hw.ncpu: 4
hw.activecpu: 4
hw.physicalcpu: 4
hw.physicalcpu_max: 4
hw.logicalcpu: 4
hw.logicalcpu_max: 4
hw.cputype: 18
hw.cpusubtype: 100
hw.cpufrequency: 2500000000
hw.cpufrequency_min: 2500000000
hw.cpufrequency_max: 2500000000
While you brought up the subject, I might as well hijack your
thread. ;-)
On the new dual-core systems, is there any way to tell which threads
are running on which physical CPUs? I was wondering if it's possible
to get better performance by restricting memory bus access (as each
pair of cores shares a single bus).
For example: two threads with a mutex that restricts access to code
that reads from memory. One thread can be churning away on data in
it's L2 cache (but will still have infrequent, accidental memory
accesses due to cache associativity etc.) while the other streams
data from memory.
Does the kernel schedule threads from the same process onto the same
physical CPU (i.e. two threads running on two cores on the same CPU)?
Is there any way to force this?