Method and system for managing lock contention in a computer system
Abstract
A system and method for efficiently managing lock contention for a central processing unit (CPU) of a computer system. The present invention uses both spinning and blocking (or undispatching) to manage threads when they are waiting to acquire a lock. In addition, the present invention intelligently determines when the program thread should spin and when the program thread should become undispatched. If it is determined that the program thread should become undispatched, the present invention provides efficient undispatching of program threads that improves throughput by reducing wait time to acquire the lock. A lock contention management system includes a dispatcher for managing the execution of threads on CPUs as well as threads that are currently ready to run but not executing because they are waiting for an available CPU, a dispatch management module that determines when a program thread should become undispatched to wait on a lock and when the program thread should spin, and low-priority execution module for undispatching the program thread. The present invention also includes a lock contention management method using the above system.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 5 · Forward citations: 17.
Claims (2 — 1 Independent, 1 Dependent)
- Claim 1Independent Claim
A lock contention management method, comprising: determining whether a code module has failed to acquire access to a lock to keep other code modules from accessing a resource; allowing a higher-priority code module to access the lock first by changing from an original priority of the code module to a lower priority if the code module should continually request access to the lock, and allowing the code module to continue to request access at the lower priority if it is determined that there are no other code modules waiting to run; and restoring the code module to its original priority after th
- Claim 2Depends on #1
The method of claim 1 , wherein: the code module continually requests access to the lock when the resource has other tasks to run; and the code module stops requesting acce
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗