Method and apparatus used for allocating lock resource to object

2014 
Embodiments of the invention provide a method and an apparatus used for allocating a lock resource to an object. The method comprises the steps of obtaining a first alternative lock used for the object; when the first alternative lock is allocated to one or more other objects, determining first associativity between the object and each object in one or more other objects; and in response to operation of determining that the first associativity is lower than a predetermined threshold, allocating the first alternative lock to the object. Through the method, the possibility of concurrent execution can be maximized, the lock resource waiting time is shortened, and the lock competition is avoided.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    0
    References
    0
    Citations
    NaN
    KQI
    []