Bird
Raised Fist0

You are designing a real-time system where short tasks must be prioritized but starvation of longer tasks is unacceptable. Which scheduling strategy best fits this requirement?

hard🌍 Real-world Scenario Q9 of Q15
Operating Systems - Shortest Job First (SJF) - Preemptive vs Non-Preemptive
You are designing a real-time system where short tasks must be prioritized but starvation of longer tasks is unacceptable. Which scheduling strategy best fits this requirement?
APure preemptive SJF scheduling
BNon-preemptive SJF scheduling
CRound Robin scheduling with fixed time quantum
DPreemptive SJF with aging to gradually increase priority of waiting tasks
Step-by-Step Solution
Solution:
  1. Step 1: Identify starvation risk in pure preemptive SJF

    Pure preemptive SJF risks starving longer tasks.
  2. Step 2: Consider aging mechanism

    Aging increases priority of waiting tasks, preventing starvation.
  3. Step 3: Evaluate alternatives

    Non-preemptive SJF delays short tasks; Round Robin may not prioritize short tasks.
  4. Final Answer:

    Option D -> Option D
  5. Quick Check:

    Preemptive SJF with aging balances priority and starvation prevention [OK]
Quick Trick: Aging prevents starvation in preemptive SJF [OK]
Common Mistakes:
MISTAKES
  • Choosing pure preemptive SJF ignoring starvation
  • Selecting non-preemptive SJF ignoring priority needs
  • Assuming Round Robin prioritizes short tasks
Trap Explanation:
PITFALL
  • Candidates often overlook aging as a starvation mitigation in preemptive scheduling.
Interviewer Note:
CONTEXT
  • Assesses ability to design scheduling for real-time constraints and fairness.
Master "Shortest Job First (SJF) - Preemptive vs Non-Preemptive" 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