Random boosting is a strategy used by the scheduler in Microsoft Windows to avoid deadlock due to priority inversion. Ready threads holding locks are randomly boosted in priority and allowed to run long enough to exit the critical section. If the thread doesn't get enough time to release the lock, it will get another chance.
This strategy is no longer used in the latest versions of Windows and has been replaced by a strategy called AutoBoost.
References
- Priority Inversion (Windows), Microsoft, retrieved December 12, 2012,
The scheduler solves this problem by randomly boosting the priority of the ready threads (in this case, the low priority lock-holders). The low priority threads run long enough to exit the critical section, and the high-priority thread can enter the critical section. If the low-priority thread does not get enough CPU time to exit the critical section the first time, it will get another chance during the next round of scheduling.
- Cohen, Aaron; Woodring, Mike (1998), Win32 Multithreaded Programming, O'Reilly & Associates, p. 30,
Windows NT solves the priority inversion problem by randomly boosting the dynamic priorities of threads that are ready to run.
- "Priority Inversion (Windows)". Retrieved 12 October 2024.
The thread scheduler addresses this issue through a feature called AutoBoost. AutoBoost automatically tracks resource reservations and adjusts thread priorities by applying priority floors that a thread must never fall below. For example, if a low–priority thread acquires a critical section and a higher–priority thread is blocked waiting for the critical section, the priority of the owner is raised to the maximum priority of the waiter until it releases the resource.