Efficient mechanism for preventing starvation in counting semaphores
Abstract
An algorithm for preventing starving threads in a counting semaphore for a computer operating system. The algorithm operates in a stealing mode where threads can steal resources from other threads if none of the threads is starving, and operates in a first-in first-out mode if one or more of the threads becomes starving.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 10 · Forward citations: 6.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer-implemented method for allocating a plurality of resources to a plurality of threads in a counting semaphore that protects the plurality of resources, said method comprising: maintaining a count of how many of the resources the semaphore currently has available for the threads; putting one of the threads to sleep on a wait queue if the semaphore does not have enough of the protected resources that are available to satisfy the one of the threads; waking the sleeping thread up from the wait queue if the protected resources become available for the sleeping thread; allowing other threa
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗