Bird
Raised Fist0

In a system using priority scheduling with aging to prevent starvation, what unexpected behavior might occur if a process holding a critical resource is preempted by an aged higher-priority process, and how can this be mitigated?

hard🎤 Interviewer Follow-up Q15 of Q15
Operating Systems - Starvation vs Deadlock vs Livelock - Differences & Examples
In a system using priority scheduling with aging to prevent starvation, what unexpected behavior might occur if a process holding a critical resource is preempted by an aged higher-priority process, and how can this be mitigated?
ALivelock will occur due to continuous priority changes; mitigation involves fixed priorities.
BDeadlock will occur immediately; mitigation requires disabling aging.
CPriority inversion may occur, delaying the critical resource release; mitigation involves priority inheritance protocols.
DStarvation will worsen for low-priority processes; mitigation involves removing aging.
Step-by-Step Solution
  1. Step 1: Identify the problem

    When a low-priority process holding a critical resource is preempted by a higher-priority process (due to aging), priority inversion can occur because the resource holder cannot proceed to release the resource.
  2. Step 2: Understand mitigation

    Priority inheritance protocols temporarily raise the priority of the resource-holding process to prevent inversion and reduce blocking time.
  3. Step 3: Analyze options

    Priority inversion may occur, delaying the critical resource release; mitigation involves priority inheritance protocols correctly identifies priority inversion and its mitigation. Deadlock will occur immediately; mitigation requires disabling aging incorrectly claims deadlock occurs immediately and suggests disabling aging, which is not a solution. Livelock will occur due to continuous priority changes; mitigation involves fixed priorities confuses livelock with priority changes. Starvation will worsen for low-priority processes; mitigation involves removing aging incorrectly states starvation worsens and suggests removing aging, which would increase starvation risk.
  4. Final Answer:

    Option C -> Option C
  5. Quick Check:

    Priority inversion + priority inheritance = correct diagnosis and fix.
Quick Trick: Priority inversion = resource holder preempted; fix with inheritance
Common Mistakes:
MISTAKES
  • Confusing priority inversion with deadlock
  • Thinking aging always prevents all scheduling issues
Trap Explanation:
PITFALL
  • Options B and D are tempting because they suggest disabling aging, but aging is needed to prevent starvation. Option C correctly identifies priority inversion and its mitigation.
Interviewer Note:
CONTEXT
  • Tests deep understanding of priority scheduling, aging, and priority inversion interactions.
Master "Starvation vs Deadlock vs Livelock - Differences & Examples" in Operating Systems

2 interactive learning modes - each teaches the same concept differently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Operating Systems Quizzes