US2018321966A1PendingUtilityA1

Efficient detection and respone to spin waits in multi-processor virtual machines

58
Assignee: MICROSOFT TECHNOLOGY LICENSING LLCPriority: Jul 30, 2008Filed: Jul 10, 2018Published: Nov 8, 2018
Est. expiryJul 30, 2028(~2.1 yrs left)· nominal 20-yr term from priority
G06F 9/45558G06F 9/526G06F 9/45533G06F 2009/4557
58
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

Various aspects are disclosed herein for attenuating spin waiting in a virtual machine environment comprising a plurality of virtual machines and virtual processors. Selected virtual processors can be given time slice extensions in order to prevent such virtual processors from becoming de-scheduled (and hence causing other virtual processors to have to spin wait). Selected virtual processors can also be expressly scheduled so that they can be given higher priority to resources, resulting in reduced spin waits for other virtual processors waiting on such selected virtual processors. Finally, various spin wait detection techniques can be incorporated into the time slice extension and express scheduling mechanisms, in order to identify potential and existing spin waiting scenarios.

Claims

exact text as granted — not AI-modified
What is claimed: 
     
         1 . A method employed by a scheduler for attenuating spin waiting of virtual processors in a virtual machine environment, comprising:
 examining a hint source for hints to determine if a virtual processor is accessing a synchronizing section that acquires a lock on an underlying physical resource that causes any other virtual processors to spin wait until the virtual processor releases the lock;   providing a time slice extension to the virtual processor to increase the time allotted in its assigned time slice if the virtual processor is accessing the synchronizing section; and   ending the time slice extension prematurely.   
     
     
         2 . The method of  claim 1 , wherein ending the time slice extension prematurely includes setting an intercept with said hint source and receiving the intercept from the hint source. 
     
     
         3 . The method of  claim 1 , wherein ending the time slice extension prematurely includes receiving a signal from an enlightened guest operating system indicating that the synchronizing section has been cleared. 
     
     
         4 . The method of  claim 1 , wherein the hint source is at least one of a task priority register, an unenlightened guest operating system that is inspected, and an enlightened operating system. 
     
     
         5 . The method of  claim 1 , wherein the scheduler resides in a virtualizing layer configured to provide the time slice extension to the virtual processor. 
     
     
         6 . The method of  claim 1 , further comprising limiting the time slice extension to a predetermined period of time. 
     
     
         7 . The method of  claim 1 , further comprising limiting the number of time slice extensions provided to a predetermined number. 
     
     
         8 . The method of  claim 1 , further comprising debiting the time slice extension provided to the virtual processor such that the virtual processor has less allocated time in a subsequent time slice. 
     
     
         9 . The method of  claim 1 , wherein the lock is at least one of a spinlock, a queued spinlock, a reader/writer lock, and a barrier; and wherein the synchronizing section comprises a region of code that determines access to resources by virtual processors. 
     
     
         10 . A system for attenuating spin waiting of virtual processors in a virtual machine environment, comprising:
 a processor; and   a memory communicatively coupled to the processor and storing instructions that upon execution by the processor cause the system to:
 examine a hint source for hints to determine if a virtual processor is accessing a synchronizing section that acquires a lock on an underlying physical resource that causes any other virtual processors to spin wait until the virtual processor releases the lock; 
 provide a time slice extension to the virtual processor to increase the time allotted in its assigned time slice if the virtual processor is accessing the synchronizing section; and 
 end the time slice extension prematurely. 
   
     
     
         11 . The system of  claim 10 , wherein the instructions for ending the time slice extension prematurely include instructions for setting an intercept with said hint source and receiving the intercept from the hint source. 
     
     
         12 . The system of  claim 10 , wherein the instructions for ending the time slice extension prematurely include instructions for receiving a signal from an enlightened guest operating system indicating that the synchronizing section has been cleared. 
     
     
         13 . The system of  claim 10 , wherein the hint source is at least one of a task priority register, an unenlightened guest operating system that is inspected, and an enlightened operating system. 
     
     
         14 . The system of  claim 10 , wherein the scheduler resides in a virtualizing layer configured to provide the time slice extension to the virtual processor. 
     
     
         15 . The system of  claim 10 , further comprising instructions for limiting the time slice extension to a predetermined period of time. 
     
     
         16 . The system of  claim 10 , further comprising instructions for limiting the number of time slice extensions provided to a predetermined number. 
     
     
         17 . The system of  claim 10 , further comprising instructions for debiting the time slice extension provided to the virtual processor such that the virtual processor has less allocated time in a subsequent time slice. 
     
     
         18 . The system of  claim 10 , wherein the lock is at least one of a spinlock, a queued spinlock, a reader/writer lock, and a barrier; and wherein the synchronizing section comprises a region of code that determines access to resources by virtual processors. 
     
     
         19 . A computer readable medium comprising machine readable instructions that, upon execution, cause the machine to:
 examine a hint source for hints to determine if a virtual processor is accessing a synchronizing section that acquires a lock on an underlying physical resource that causes any other virtual processors to spin wait until the virtual processor releases the lock;   provide a time slice extension to the virtual processor to increase the time allotted in its assigned time slice if the virtual processor is accessing the synchronizing section; and   end the time slice extension prematurely;   wherein the instructions for ending the time slice extension prematurely include at least one of: (a) instructions for setting an intercept with said hint source and receiving the intercept from the hint source; and (b) instructions for receiving a signal from an enlightened guest operating system indicating that the synchronizing section has been cleared.   
     
     
         20 . The computer readable medium of  claim 19 , further comprising instructions for limiting the time slice extension to a predetermined period of time; instructions for limiting the number of time slice extensions provided to a predetermined number; and instructions for debiting the time slice extension provided to the virtual processor such that the virtual processor has less allocated time in a subsequent time slice.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.