×

Systems and methods for performing concurrency restriction and throttling over contended locks

  • US 10,417,056 B2
  • Filed: 08/04/2015
  • Issued: 09/17/2019
  • Est. Priority Date: 08/04/2015
  • Status: Active Grant
First Claim
Patent Images

1. A method, comprising:

  • performing by a computer;

    beginning execution of a multithreaded application that comprises a plurality of requests to acquire a concurrency-restricting lock associated with a critical section of code or a shared resource;

    arriving, by a given thread of the application, at the concurrency restricting lock;

    determining, whether the given thread is to be placed in an active circulation set associated with the concurrency-restricting lock or in a passive set associated with the concurrency-restricting lock, wherein threads in the active circulation set are able to contend for the concurrency-restricting lock, and wherein one thread in the passive set is able to contend for the concurrency-restricting lock;

    placing the given thread in the determined one of the active circulation set or the passive set; and

    subsequent to said placing;

    determining, based on a predetermined saturation threshold associated with the active circulation set, to apply a culling policy, wherein applying the culling policy comprises;

    controlling movement of threads to and from the active circulation set and passive set to cause a reduction in a number of threads in the active circulation set based at least in part on the saturation threshold of the concurrency-restricting lock dependent on a size of the active circulation set that is eligible to contend for the concurrency-restricting lock, andmoving a thread from the active circulation set to the passive set; and

    determining to apply a fairness policy to the passive set, wherein applying the fairness policy comprises;

    moving another thread from the passive set to the active circulation set.

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