CS FundamentalsHardGATE CS · Amazon/Microsoft SDE MCQ

A low-priority task L holds a mutex. High-priority H blocks on it, and medium-priority M (which does not need the mutex) becomes ready. Under the priority-ceiling protocol where the mutex's ceiling is H's priority, what happens?

  1. A. M preempts L, because M has a higher priority than L
  2. B. L already runs at H's priority, so M cannot preempt it
  3. C. H preempts L and takes over the mutex while L waits
  4. D. L is aborted so that the mutex is released for H at once

Correct answer: B. L already runs at H's priority, so M cannot preempt it

With immediate priority ceiling, a task takes the ceiling priority as soon as it locks the mutex, so M cannot preempt L while L is in the critical section, and H's blocking is bounded. Without such a protocol M could delay H indefinitely.

More Operating Systems questions

Exams that ask this topic