发明名称 Systems and Methods for Performing Concurrency Restriction and Throttling over Contended Locks
摘要 A concurrency-restricting lock may divide a set of threads waiting to acquire the lock into an active circulating set (ACS) that contends for the lock, and a passive set (PS) that awaits an opportunity to contend for the lock. The lock, which may include multiple constituent lock types, lists, or queues, may be unfair over the short term, but improve throughput of the underlying multithreaded application. Culling and long-term fairness policies may be applied to the lock to move excess threads from the ACS to the PS or promote threads from the PS to the ACS. These policies may constraint the size or distribution of threads in the ACS (which may be NUMA-aware). A waiting policy may avoid aggressive promotion from the PS to the ACS, and a short-term fairness policy may move a thread from the tail of a list or queue to its head.
申请公布号 US2017039094(A1) 申请公布日期 2017.02.09
申请号 US201514818213 申请日期 2015.08.04
申请人 Oracle International Corporation 发明人 Dice David
分类号 G06F9/52 主分类号 G06F9/52
代理机构 代理人
主权项 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 at most 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; andsubsequent to said placing: applying a culling policy to the active circulation set, wherein applying the culling policy comprises moving a thread from the active circulation set to the passive set; orapplying a fairness policy to the passive set and the active circulation set, wherein applying the fairness policy comprises moving a thread from the passive set to the active circulation set.
地址 Redwood City CA US