Q111: How can priority inversion be handled?

You can checkout question #108 to know what is priority inversion.

Question #111: How can priority inversion be handled?

Options:

  1. By raising the priority of the blocked process.
  2. By lowering the priority of the blocked process.
  3. By raising the priority of the lower priority process for which higher priority process is waiting.
  4. Both 2 and 3.

Solution: The correct answer is 4th one. If we let lower priority process run by temporarily raising its priority, it will release the semaphore quickly. This is called priority inheritance. This might be needed at various steps in the chain and not just once.

Q108: Priority Inversion

Question #108: Priority inversion refers to:

Options:

  1. Inverting the priority of the processes.
  2. A higher priority process blocked on a lower priority process.
  3. A lower priority process blocked on a higher priority process.
  4. Considering the priority in a reverse manner.

Solution: The correct answer is 2nd one. An example of this is when a lower priority process has acquired a semaphore and a higher priority process needs to acquire that semaphore. Hence, it needs to wait for a lower priority process to release the semaphore first.