O'Reilly logo

Windows® via C/C++, Fifth Edition by Christophe Nasarre, Jeffrey Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Affinities

By default, Windows Vista uses soft affinity when assigning threads to processors. This means that if all other factors are equal, it tries to run the thread on the processor it ran on last. Having a thread stay on a single processor helps reuse data that is still in the processor’s memory cache.

There is a computer architecture called NUMA (Non-Uniform Memory Access) in which a machine consists of several boards. Each board has its own CPUs and its own bank of memory. The following figure shows a machine with three boards in it, with each board having 4 CPUs, making 12 CPUs available so that any single thread can run on any of the 12 CPUs.

A NUMA system performs best when a CPU accesses the memory that is on its own board. If the CPU ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required