What is priority inversion?

前端 未结 11 2035
北恋
北恋 2020-12-22 15:05

I\'ve heard the phrase \'priority inversion\' in reference to development of operating systems.

What exactly is priority inversion?

What is the problem it\'s

11条回答
  •  再見小時候
    2020-12-22 15:55

    Consider a system with two processes,H with high priority and L with low priority. The scheduling rules are such that H is run whenever it is in ready state because of its high priority. At a certain moment, with L in its critical region, H becomes ready to run (e.g., an I/O operation completes). H now begins busy waiting, but since L is never scheduled while H is running, L never gets the chance to leave the critical section. So H loops forever.

    This situation is called Priority Inversion. Because higher priority process is waiting on lower priority process.

提交回复
热议问题