Bird
Raised Fist0

In a system with multiple threads, which condition best exemplifies starvation?

easy💻 Programming Q1 of Q15
Operating Systems - Starvation vs Deadlock vs Livelock - Differences & Examples
In a system with multiple threads, which condition best exemplifies starvation?
ATwo threads hold resources and wait indefinitely for each other's resource
BA low-priority thread never gets CPU time because higher-priority threads keep running
CThreads continuously change states without making progress
DA thread completes execution without interruption
Step-by-Step Solution
Solution:
  1. Step 1: Understand starvation

    Starvation occurs when a thread is perpetually denied access to resources due to scheduling policies favoring others.
  2. Step 2: Analyze options

    A low-priority thread never gets CPU time because higher-priority threads keep running describes a low-priority thread never getting CPU time, which is classic starvation. Two threads hold resources and wait indefinitely for each other's resource describes deadlock, C describes livelock, and D is normal execution.
  3. Final Answer:

    Option B -> Option B
  4. Quick Check:

    Starvation means indefinite waiting due to priority [OK]
Quick Trick: Starvation = low priority thread waits forever [OK]
Common Mistakes:
MISTAKES
  • Confusing deadlock with starvation
  • Thinking livelock is starvation
  • Assuming starvation means thread termination
Trap Explanation:
PITFALL
  • Deadlock and livelock options seem similar but differ in resource holding and progress
Interviewer Note:
CONTEXT
  • Tests understanding of starvation concept and its distinction from deadlock and livelock
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