優先級繼承
優先級繼承是實時計算中去除優先級翻轉的一種方法。進程調度算法對獲取到臨界資源的進程(A)增加其優先級為所有等待該資源的進程中的最高優先級。 一旦進程(A)釋放了該資源,就恢復到原來的優先級。[1]
例子
編輯考慮下例:
Job Name | Priority |
---|---|
H | High |
M | Medium |
L | Low |
假定L獲取到共享資源後,H申請該資源不得而被阻塞。優先級繼承協議把L的優先級升級到H的級別。M將不能搶先L因而M被阻塞。當L釋放資源後,恢復到低優先級並喚醒H。H有高優先級因而搶先了L的執行權。隨後M、L依次恢復執行。
參考文獻
編輯- ^ Lui Sha; Ragunathan Rajkumar & John P. Lehoczky. Priority Inheritance Protocols: An Approach to Real-Time Synchronization (PDF). IEEE Transactions on Computers. September 1990, 39 (9): 1175–1185 [2017-12-02]. doi:10.1109/12.57058. (原始內容存檔 (PDF)於2016-07-29).
- "Priority Inheritance: The Real Story" by Doug Locke
- "Against Priority Inheritance" by Victor Yodaiken
- "Implementing Concurrency Control With Priority Inheritance in Real-Time CORBA (頁面存檔備份,存於網際網路檔案館)" by Steven Wohlever, Victor Fay Wolfe and Russell Johnston
- "Priority Inheritance Spin Locks for Multiprocessor Real-Time Systems" by Cai-Dong Wang, Hiroaki Takada and Ken Sakamura
- "Hardware Support for Priority Inheritance" by Bilge E. S. Akgul, Vincent J. Mooney, Henrik Thane and Pramote Kuacharoen