GATE Exam  >  GATE Questions  >  Consider a system has three processes and thr... Start Learning for Free
Consider a system has three processes and three resources are available of same type. If each process needs maximum two resources, which of the following is correct?
  • a)
    Thrashing
  • b)
    Deadlock never occur in the system
  • c)
    Deadlock may occur
  • d)
    Starvation occurs
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
Consider a system has three processes and three resources are availabl...
Deadlock occur if each and every process holds one resource and request resource of other process such that circular wait condition get satisfied. Let A, B, C be these processes holding one process each.
View all questions of this test
Most Upvoted Answer
Consider a system has three processes and three resources are availabl...
Understanding the System Configuration
In this scenario, we have three processes (P1, P2, P3) and three identical resources available. Each process can claim a maximum of two resources.
Resource Allocation
- Each process can request two resources at most.
- Total resources available = 3.
- If all three processes claim their maximum (2 each), it exceeds the total available resources.
Deadlock Conditions
For a deadlock to occur, the following four conditions must hold:
1. Mutual Exclusion: Resources cannot be shared.
2. Hold and Wait: Processes holding resources can wait for more.
3. No Preemption: Resources cannot be forcibly taken from a process.
4. Circular Wait: A cycle of processes exists, each waiting for a resource held by another.
Analysis of Deadlock
- Given three processes and three resources, a deadlock can occur. For example:
- P1 holds 1 resource and waits for 1 more.
- P2 holds 1 resource and waits for 1 from P1.
- P3 holds 1 resource and waits for 1 from P2.
This creates a circular wait, satisfying all deadlock conditions.
Conclusion
- Deadlock May Occur (Correct Answer: C): The configuration allows for a situation where processes may wait indefinitely for resources, leading to a deadlock scenario.
- Thrashing: This does not apply here, as it refers to excessive paging in memory management, not resource allocation.
- Deadlock Never Occurs: This is incorrect due to the possibility of circular wait.
- Starvation: While processes may wait indefinitely, it does not guarantee starvation as they might still eventually acquire resources.
Hence, the correct answer is that deadlock may occur in the system.
Explore Courses for GATE exam

Similar GATE Doubts

Consider a system has three processes and three resources are available of same type. If each process needs maximum two resources, which of the following is correct?a)Thrashingb)Deadlock never occur in the systemc)Deadlock may occurd)Starvation occursCorrect answer is option 'C'. Can you explain this answer?
Question Description
Consider a system has three processes and three resources are available of same type. If each process needs maximum two resources, which of the following is correct?a)Thrashingb)Deadlock never occur in the systemc)Deadlock may occurd)Starvation occursCorrect answer is option 'C'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about Consider a system has three processes and three resources are available of same type. If each process needs maximum two resources, which of the following is correct?a)Thrashingb)Deadlock never occur in the systemc)Deadlock may occurd)Starvation occursCorrect answer is option 'C'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider a system has three processes and three resources are available of same type. If each process needs maximum two resources, which of the following is correct?a)Thrashingb)Deadlock never occur in the systemc)Deadlock may occurd)Starvation occursCorrect answer is option 'C'. Can you explain this answer?.
Solutions for Consider a system has three processes and three resources are available of same type. If each process needs maximum two resources, which of the following is correct?a)Thrashingb)Deadlock never occur in the systemc)Deadlock may occurd)Starvation occursCorrect answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of Consider a system has three processes and three resources are available of same type. If each process needs maximum two resources, which of the following is correct?a)Thrashingb)Deadlock never occur in the systemc)Deadlock may occurd)Starvation occursCorrect answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider a system has three processes and three resources are available of same type. If each process needs maximum two resources, which of the following is correct?a)Thrashingb)Deadlock never occur in the systemc)Deadlock may occurd)Starvation occursCorrect answer is option 'C'. Can you explain this answer?, a detailed solution for Consider a system has three processes and three resources are available of same type. If each process needs maximum two resources, which of the following is correct?a)Thrashingb)Deadlock never occur in the systemc)Deadlock may occurd)Starvation occursCorrect answer is option 'C'. Can you explain this answer? has been provided alongside types of Consider a system has three processes and three resources are available of same type. If each process needs maximum two resources, which of the following is correct?a)Thrashingb)Deadlock never occur in the systemc)Deadlock may occurd)Starvation occursCorrect answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider a system has three processes and three resources are available of same type. If each process needs maximum two resources, which of the following is correct?a)Thrashingb)Deadlock never occur in the systemc)Deadlock may occurd)Starvation occursCorrect answer is option 'C'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev