×

SYSTEM AND METHOD FOR LOAD-ADAPTIVE MUTUAL EXCLUSION WITH WAITING PROCESS COUNTS

  • US 20090320028A1
  • Filed: 06/18/2008
  • Published: 12/24/2009
  • Est. Priority Date: 06/18/2008
  • Status: Active Grant
First Claim
Patent Images

1. A method for mutually exclusively executing a critical section by a process in a computer system, wherein a lock permits the process an access to the critical section, the method comprising:

  • upon detecting that the lock is held by another process, adding one (1) to a waiter count that represents the number of processes waiting for the lock, measuring a detection time that represents the time of said detecting, and measuring a current time representing a present time;

    subsequent to said adding, repeating at least one iteration comprising steps of determining a waiting mode of the process, and subsequently attempting to acquire the lock, wherein the waiting mode is determined such that the process in the waiting mode wastes the least amount of time while waiting for the lock pursuant to at least one delay stored in a lock delay history data structure and a suspension overhead time of the computer system;

    subsequent to said repeating, acquiring the lock for the process;

    subsequent to said acquiring, calculating a delay representing a difference between a release time representing when the lock is released and the detection time;

    subsequent to said calculating, storing the calculated delay in the lock delay history data structure; and

    subsequent to said storing, subtracting one (1) from the waiter count,wherein said adding, said repeating, said acquiring, said calculating, said storing, and said subtracting are performed by a locking function invoked by the process.

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