US8060880B2

System using backward inter-procedural analysis for determining alternative coarser grained lock when finer grained locks exceeding threshold

Summary by NHIP

Backward Inter-Proc Lock Analysis

The method identifies atomic sections in concurrent programs and performs backward inter-procedural analysis to determine memory locations requiring locks. When fine grained locks exceed a specified bound K, the system determines alternative coarser grained locks acquired in pre-order or post-order by a runtime library or compiler system.

Claim Score by NHIP

Read claim 1, the broadest

Abstract

Locks which protect data structures used within atomic sections of concurrent programs are inferred from atomic sections and acquired in a manner to avoid deadlock. Locks may be inferred by expression correspondence using a backward inter-procedural analysis of an atomic section. Locks may be sorted according to a total order and acquired early in an atomic section to prevent deadlock. Multiple granularity of locks are determined and employed. Fine grained locks may be inferred and acquired to reduce contention. Coarse grained locks may be determined and substituted for fine grained locks when necessary for unbounded locations or to reduce the number of finer grained locks.

US8060880B2, drawing sheet 1
Sheet 1 of 6

Term

Projected expiry 29 December 2029.

  1. Priority and filed
  2. Granted
  3. Today
  4. Projected expiry

11 claims: 3 independent, 8 dependent

  1. 1
    Broadest claimClaim Score 43, average(NHIP)A computer-implemented method of acquiring one or more locks within a concurrent program, the method comprising:identifying an atomic section within the concurrent program, the atomic section including a plurality of statements that reference a plurality of variables used within the atomic section, wherein each variable refers to a memory location;performing a backwards inter-procedural analysis on the atomic section to determine which of the memory locations need to be locked during execution of the atomic section, the backwards inter-procedural analysis comprising examining lines of code within the atomic section in a bottom to top order, the backward inter-procedural analysis including determining that a memory location is referred to by more than one of the plurality of variables, and placing a fine grained lock on only one of the more than one variables which refer to the memory location;after performing the backwards inter-procedural analysis, determining a number of fine grained locks which were placed on the variables of the atomic section;and upon the number of fine grained locks exceeding a specified bound K, determining one or more alternative coarser grained locks to be used in place of the fine grained locks such that the number of locks for the atomic section do not exceed the specified bound K.
  2. 7
    A computer-implemented method of determining one or more locks to be acquired for a concurrent program, the method comprising:identifying an atomic section of the concurrent program, the atomic section including a plurality of statements that reference a plurality of variables used within the atomic section, wherein each variable refers to a memory location;determining expression correspondence for the atomic section by performing a backwards inter-procedural analysis on the atomic section to determine which of the memory locations need to be locked during execution of the atomic section, the backwards inter-procedural analysis comprising examining lines of code within the atomic section in a bottom to top order, the backward inter-procedural analysis including determining that a memory location is referred to by more than one of the plurality of variables, and placing a fine grained lock on only one of the more than one variables which refer to the memory location;after performing the backwards inter-procedural analysis, determining a number of fine grained locks which were placed on the variables of the atomic section;and upon the number of fine grained locks exceeding a specified bound K, determining one or more alternative coarser grained locks to be used in place of the fine grained locks such that the number of locks for the atomic section do not exceed the specified bound K.
  3. 10
    A computer program product comprising one or more physical computer-readable media having instructions encoded thereon which, when executed, implement a method of determining locks to be acquired for an atomic section of a concurrent program, the method comprising:identifying an atomic section of the concurrent program, the atomic section including a plurality of statements that reference a plurality of variables used within the atomic section, wherein each variable refers to a memory location;performing a backwards inter-procedural analysis on the atomic section to determine which of the memory locations need to be locked during execution of the atomic section, the backwards inter-procedural analysis comprising examining lines of code within the atomic section in a bottom to top order, the backward inter-procedural analysis including determining that a memory location is referred to by more than one of the plurality of variables, and placing a fine grained lock on only one of the more than one variables which refer to the memory location;after performing the backwards inter-procedural analysis, determining a number of fine grained locks which were placed on the variables of the atomic section;and upon the number of fine grained locks exceeding a specified bound K, determining one or more alternative coarser grained locks to be used in place of the fine grained locks such that the number of locks for the atomic section do not exceed the specified bound K.