Patent ID: 8307371

Claim:
A method for selecting a physical processor to be acquired in a virtual, shared computing environment having a plurality of operating systems executing within logical partitions, and separated from a plurality of available physical processors by a hypervisor that provides virtualization and partitioning of the available physical processors, the method comprising: for a given requesting operating system, initiating a first selection phase to attempt to acquire a last relinquished physical processor of the requesting operating system within the shared computing environment, the last relinquished physical processor corresponding to a most recently relinquished physical processor previously in use by requesting the operating system in the shared computing environment, so as to achieve a highest likelihood of retrieving a cache containing data still valid with respect to the requesting operating system; wherein the first selection phase further comprises: determining whether a first variable assigned to track the identity of the last relinquished physical processor has a NULL value, the first variable having, as possible values, n, where the n is a total number of the plurality of physical processors that are available for use within the logical partition in which the requesting system is operating; automatically initiating a second selection phase only in the event of a failure to acquire the last relinquished physical processor by the first selection phase, wherein the value of the first variable is NULL; and in the event the value of the first variable is not NULL, setting the value of a second variable assigned to track the identity of a last acquired physical processor to the value of the first variable, thereafter setting the value of the first variable to NULL, and invoking an acquire request to a hypervisor for the processor corresponding to a new value of the second variable, the second variable having, as possible values, m, where the m is the number of processors available for use by the logical partition in which a particular operating system instance is operating; wherein the second selection phase further comprises a round-robin selection process for presently relinquished physical processors.