×

Busy-wait time for threads

  • US 8,769,546 B2
  • Filed: 01/07/2010
  • Issued: 07/01/2014
  • Est. Priority Date: 01/07/2010
  • Status: Active Grant
First Claim
Patent Images

1. A method for controlling a busy-wait time assigned to a thread attempting to access a shared resource protected by a mutex lock associated with a condition variable, wherein a thread having acquired the mutex will access the shared resource when the state of the condition variable is favorable and will otherwise release the mutex and wait on the condition variable until the state becomes favorable, the method comprising:

  • attempting to acquire the mutex by a first thread and determining the mutex is unavailable for acquisition by the first thread; and

    assigning one of a default busy-wait time and a reduced busy-wait time to the first thread in response to determining the mutex is unavailable, wherein the reduced busy-wait time is less than the default busy-wait time and greater than zero, the assigning comprising;

    assigning the default busy-wait time when there are no other threads waiting on the condition variable; and

    assigning the reduced busy-wait time when there is at least one other thread waiting on the condition variable.

View all claims
  • 4 Assignments
Timeline View
Assignment View
    ×
    ×