ISRO Scientist/Engineer CSE 2023Operating Systems › Process Synchronization
ISRO Scientist/Engineer CSE 2023 PYQ: Purpose of priority inheritance protocol in synchronization mechanisms is
Purpose of priority inheritance protocol in synchronization mechanisms is
- ATo prevent priority inversion in systems having two or lesser priorities for a resource
- BTo provide mutual exclusion between threads and prevent data corruption
- CTo prevent priority inversion and ensure fairness in resource allocationCorrect answer
- DTo allow multiple threads to access any resource simultaneously
Answer
(C) To prevent priority inversion and ensure fairness in resource allocation
Approach
Priority inheritance protocol solves priority inversion by temporarily raising the priority of a lower-priority task that holds a resource needed by a higher-priority task, so medium-priority tasks cannot indefinitely delay the higher-priority task. Option A is wrong because PIP is not limited to two or fewer priorities; the classic problem needs three levels. Option B describes mutual exclusion, which is provided by locks/mutexes, while option D is false because PIP does not allow simultaneous access. Thus C is correct: PIP prevents priority inversion and supports fair/timely resource allocation for high-priority tasks.
Reviewed by ISRO IQ Editorial Team.