Questions: Priority Scheduling and Priority Inversion

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

Three tasks: L (low priority) holds a mutex, H (high priority) needs the mutex, and M (medium priority) is ready but does not need the mutex. Without any fix, in what order do these tasks run?

AH runs first, acquires the mutex from L by force, then L runs, then M
BL runs to completion, releases mutex, H runs, M runs last
CM preempts L (since M > L in priority), while H waits, then L runs and releases mutex, then H runs
DH and M run concurrently, since H is blocked and M is ready
Question 2 Multiple Choice

Priority inheritance and priority ceiling are both solutions to priority inversion. What is the key difference in when the lock-holder's priority is raised?

APriority inheritance raises priority when the lock is created; priority ceiling raises it when a waiter appears
BPriority inheritance raises priority when a higher-priority task blocks on the lock; priority ceiling raises priority immediately when the lock is acquired
CBoth methods raise priority at the same time but use different priority values
DPriority inheritance is used for mutexes; priority ceiling is used for semaphores only
Question 3 True / False

Without a solution like priority inheritance, priority inversion can cause a high-priority task to wait indefinitely.

TTrue
FFalse
Question 4 True / False

Priority inheritance permanently changes a task's base priority for the duration of its execution.

TTrue
FFalse
Question 5 Short Answer

Why is priority-based scheduling alone not sufficient to prevent priority inversion, and what additional mechanism is required?

Think about your answer, then reveal below.