Bird
Raised Fist0

You are designing a real-time system where missing deadlines is critical. Which approach best minimizes the risk of starvation without risking deadlock?

hard🌍 Real-world Scenario Q9 of Q15
Operating Systems - Starvation vs Deadlock vs Livelock - Differences & Examples
You are designing a real-time system where missing deadlines is critical. Which approach best minimizes the risk of starvation without risking deadlock?
AUse priority scheduling with aging and implement a resource hierarchy to prevent circular waits.
BUse round-robin scheduling without priority to ensure fairness.
CUse strict priority scheduling without aging to guarantee high-priority tasks run first.
DUse optimistic concurrency control to avoid locking resources.
Step-by-Step Solution
Solution:
  1. Step 1: Identify requirements

    Minimize starvation and avoid deadlock in real-time system.
  2. Step 2: Evaluate options

    Use priority scheduling with aging and implement a resource hierarchy to prevent circular waits. combines aging (prevents starvation) and resource hierarchy (prevents deadlock).
    Use round-robin scheduling without priority to ensure fairness. ensures fairness but may miss deadlines.
    Use strict priority scheduling without aging to guarantee high-priority tasks run first. risks starvation of low-priority tasks.
    Use optimistic concurrency control to avoid locking resources. avoids locking but may not guarantee deadlines or prevent starvation.
  3. Final Answer:

    Option A -> Option A
  4. Quick Check:

    Aging + resource hierarchy balances starvation and deadlock [OK]
Quick Trick: Combine aging and resource hierarchy to prevent starvation and deadlock [OK]
Common Mistakes:
MISTAKES
  • Choosing fairness over deadlines
  • Ignoring deadlock prevention
  • Overlooking starvation in strict priority
Trap Explanation:
PITFALL
  • Candidates often pick fairness or strict priority ignoring combined starvation and deadlock risks in real-time systems.
Interviewer Note:
CONTEXT
  • Assesses ability to design systems balancing starvation and deadlock constraints.
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