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:
Step 1: Understand starvation
Starvation occurs when a thread is perpetually denied access to resources due to scheduling policies favoring others.
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.
Final Answer:
Option B -> Option B
Quick Check:
Starvation means indefinite waiting due to priority [OK]