Patent ID: 8024728

Claim:
A computer implemented method for dispatching virtual processors, the computer implemented method comprising: determining if a physical processor in a set of physical processors configured to be shared among a set of two or more partitions is idle forming a first idle physical processor, wherein each partition of the set of two or more partitions is configured with a partition identifier and a plurality of virtual processors for dispatching on the shared set of physical processors; responsive to an existence of the first idle physical processor, determining if an affinity map for the first idle physical processor exists, wherein the affinity map provides a first mapping of the first idle physical processor to a set of virtual processors that ran last on the first idle physical processor over a number of events, a second mapping of a set of partition identifiers of the set of virtual processors that ran last on the first idle physical processor over the number of events, and a third mapping of the set of virtual processors last dispatched on the first idle physical processor, over the number of events, to the first idle physical processor; responsive to an existence of the affinity map for the first idle physical processor, determining whether a virtual processor in the set of virtual processors last mapped to the first idle physical processor is ready to run using the affinity map for the first idle physical processor and a dispatch algorithm; and responsive to identifying a ready-to-run virtual processor whose affinity map indicates that the first idle physical processor is mapped to the ready-to-run virtual processor in its preceding dispatch, dispatching the ready-to-run virtual processor to the first idle physical processor, wherein memory affinity is maintained between physical and virtual processors and wherein the memory affinity is not expired.