CS FundamentalsHardGATE CS · Product-company placement

A low-priority task L holds a mutex needed by high-priority task H. A medium-priority task M, which does not need the mutex, becomes ready and keeps running, so H misses its deadline. Which fix targets this problem directly?

  1. A. Give H a longer time slice
  2. B. Raise L's priority to H's while L holds the mutex that H waits for
  3. C. Replace the mutex with a spinlock
  4. D. Lower M's priority below L's permanently

Correct answer: B. Raise L's priority to H's while L holds the mutex that H waits for

This is unbounded priority inversion. Priority inheritance (or a priority ceiling) lets L run at H's priority until it releases the mutex, so M cannot preempt it. A spinlock would make H burn CPU while L still cannot run.

More Operating Systems questions

Exams that ask this topic