Patent ID: 8799908
Filing Date: 2014-08-05
Classification: G06F

Abstract:
1. A computer implemented method for controlling access to a contested resource, the computer implemented method comprising: receiving a lock acquisition request from a virtual machine in a computer system, wherein the computer system is a computer and wherein the computer is hardware; determining, by the computer system, whether the lock acquisition request for a lock is received within a preemption period of a time slice of a defined duration allocated to the virtual machine; responsive to determining that the lock acquisition request is received within a preemption period, ending, by the computer system the time slice prior to a conclusion of the defined duration without granting the lock to the virtual machine; responsive to determining that the lock acquisition request is not received within the preemption period, setting a flag indicating that the virtual machine holds the lock; and to grant the lock to the virtual machine; responsive to an ending of the defined duration, determining whether the flag indicating that the virtual machine holds the lock is set; responsive to determining that the flag indicating that the virtual machine holds the lock is set, extending the time slice creating an extended time slice allocated to the virtual machine to a duration greater than the defined duration; and responsive to expiration of the extended time slice, to perform a context switch to a second virtual machine, wherein the context switch is performed by the partition management firmware.