×

OPPORTUNISTIC USE OF LOCK MECHANISM TO REDUCE WAITING TIME OF THREADS TO ACCESS A SHARED RESOURCE

  • US 20110161539A1
  • Filed: 12/31/2009
  • Published: 06/30/2011
  • Est. Priority Date: 12/31/2009
  • Status: Active Grant
First Claim
Patent Images

1. In association with a plurality of processors including two or more processors that each provides a specified thread to access a shared resource, wherein the shared resource can only be accessed by one thread at a given time, a locking mechanism enables a first one of the specified threads to access the shared resource while each of the other specified threads is retained in a waiting queue, and a second one of the specified threads occupies a position of highest priority in the queue, a method comprising the steps of:

  • identifying a time period between a time when the first specified thread releases access to the shared resource, and a later time when the second specified thread becomes enabled to access the shared resource;

    responsive to an additional thread that is not one of the specified threads being provided by a processor to access the shared resource during the identified time period, determining whether a first prespecified criterion pertaining to the specified threads retained in said queue has been met;

    responsive to said first criterion being met, determining whether a second prespecified criterion has been met, wherein said second criterion is that the number of specified threads in said queue has not decreased since a specified prior time; and

    responsive to said second criterion being met, deciding whether to enable said additional thread to access the shared resource before the second specified thread accesses the shared resource.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×