A method and a system is disclosed for managing distribution of
computer-executable program threads between a plurality of central
processing units (CPUs) administered by an operating system in a
multi-CPU computer system having a plurality of memory caches shared
amongst the CPUs. The method includes assigning the CPUs to a plurality
of CPU-groups of a predetermined group-size, selecting a CPU-group form
the CPU-groups, setting a predetermined threshold for the selected
CPU-group, and affinitizing a program thread to the selected CPU-group
based on the predetermined threshold wherein the operating system
distributes the program threads among the CPU-groups based on the
affinitizing. In this way, the memory access time delays associated with
the transfer of data amongst the CPU-groups can be advantageously reduced
while the ability to more effectively utilize the total number of
available CPUs in the processing of the program threads is advantageously
increased.