Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider a system with 4 types of resources R... Start Learning for Free
Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.
Process P1: 
t=0: requests 2 units of R2 
t=1: requests 1 unit of R3 
t=3: requests 2 units of R1 
t=5: releases 1 unit of R2    
        and 1 unit of R1. 
t=7: releases 1 unit of R3 
t=8: requests 2 units of R4 
t=10: Finishes
Process P2: 
t=0: requests 2 units of R3 
t=2: requests 1 unit of R4 
t=4: requests 1 unit of R1 
t=6: releases 1 unit of R3 
t=8: Finishes
Process P3: 
t=0: requests 1 unit of R4 
t=2: requests 2 units of R1 
t=5: releases 2 units of R1 
t=7: requests 1 unit of R2 
t=8: requests 1 unit of R3 
t=9: Finishes
Which one of the following statements is TRUE if all three processes run concurrently starting at time t=0? 
  • a)
    All processes will finish without any deadlock
  • b)
    Only P1 and P2 will be in deadlock.
  • c)
    Only P1 and P3 will be in a deadlock.
  • d)
    All three processes will be in deadlock
Correct answer is option 'A'. Can you explain this answer?
Verified Answer
Consider a system with 4 types of resources R1 (3 units), R2 (2 units)...
We can apply the following Deadlock Detection algorithm and see that there is no process waiting indefinitely for a resource.
View all questions of this test
Most Upvoted Answer
Consider a system with 4 types of resources R1 (3 units), R2 (2 units)...
System Resources:
R1 (3 units)
R2 (2 units)
R3 (3 units)
R4 (2 units)

Non-preemptive resource allocation policy is used, and a request is not entertained if it cannot be completely satisfied.

Process P1:
- t=0: requests 2 units of R2
- t=1: requests 1 unit of R3
- t=3: requests 2 units of R1
- t=5: releases 1 unit of R2 and 1 unit of R1
- t=7: releases 1 unit of R3
- t=8: requests 2 units of R4
- t=10: Finishes

Process P2:
- t=0: requests 2 units of R3
- t=2: requests 1 unit of R4
- t=4: requests 1 unit of R1
- t=6: releases 1 unit of R3
- t=8: Finishes

Process P3:
- t=0: requests 1 unit of R4
- t=2: requests 2 units of R1
- t=5: releases 2 units of R1
- t=7: requests 1 unit of R2
- t=8: requests 1 unit of R3
- t=9: Finishes

If all three processes run concurrently starting at time t=0, then:

All processes will finish without any deadlock.

Explanation:
- At t=0, P1 requests 2 units of R2 and P2 requests 2 units of R3. Both requests can be satisfied, as there are 2 units of R2 and 1 unit of R3 available.
- At t=1, P1 requests 1 unit of R3. The request can be satisfied, as there is 1 unit of R3 available.
- At t=2, P2 requests 1 unit of R4 and P3 requests 2 units of R1. Both requests can be satisfied, as there is 1 unit of R4 and 1 unit of R1 available.
- At t=3, P1 requests 2 units of R1. The request can be satisfied, as there are 2 units of R1 available.
- At t=4, P2 requests 1 unit of R1. The request can be satisfied, as there is 1 unit of R1 available.
- At t=5, P1 releases 1 unit of R2 and 1 unit of R1, and P3 releases 2 units of R1. Both releases increase the availability of resources.
- At t=6, P2 releases 1 unit of R3. The release increases the availability of resources.
- At t=7, P1 releases 1 unit of R3 and requests 2 units of R4, P3 requests 1 unit of R2 and 1 unit of R3. All requests can be satisfied, as there is 1 unit of R3, 1 unit of R2, and 1 unit of R4 available.
- At t=8, P1 requests 2 units of R4 and P3 requests 1 unit of R3. Both requests can be satisfied, as there is 1 unit of R3 and 1 unit of R4 available
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.Process P1:t=0: requests 2 units of R2t=1: requests 1 unit of R3t=3: requests 2 units of R1t=5: releases 1 unit of R2 and 1 unit of R1.t=7: releases 1 unit of R3t=8: requests 2 units of R4t=10: FinishesProcess P2:t=0: requests 2 units of R3t=2: requests 1 unit of R4t=4: requests 1 unit of R1t=6: releases 1 unit of R3t=8: FinishesProcess P3:t=0: requests 1 unit of R4t=2: requests 2 units of R1t=5: releases 2 units of R1t=7: requests 1 unit of R2t=8: requests 1 unit of R3t=9: FinishesWhich one of the following statements is TRUE if all three processes run concurrently starting at time t=0?a)All processes will finish without any deadlockb)Only P1 and P2 will be in deadlock.c)Only P1 and P3 will be in a deadlock.d)All three processes will be in deadlockCorrect answer is option 'A'. Can you explain this answer?
Question Description
Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.Process P1:t=0: requests 2 units of R2t=1: requests 1 unit of R3t=3: requests 2 units of R1t=5: releases 1 unit of R2 and 1 unit of R1.t=7: releases 1 unit of R3t=8: requests 2 units of R4t=10: FinishesProcess P2:t=0: requests 2 units of R3t=2: requests 1 unit of R4t=4: requests 1 unit of R1t=6: releases 1 unit of R3t=8: FinishesProcess P3:t=0: requests 1 unit of R4t=2: requests 2 units of R1t=5: releases 2 units of R1t=7: requests 1 unit of R2t=8: requests 1 unit of R3t=9: FinishesWhich one of the following statements is TRUE if all three processes run concurrently starting at time t=0?a)All processes will finish without any deadlockb)Only P1 and P2 will be in deadlock.c)Only P1 and P3 will be in a deadlock.d)All three processes will be in deadlockCorrect answer is option 'A'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.Process P1:t=0: requests 2 units of R2t=1: requests 1 unit of R3t=3: requests 2 units of R1t=5: releases 1 unit of R2 and 1 unit of R1.t=7: releases 1 unit of R3t=8: requests 2 units of R4t=10: FinishesProcess P2:t=0: requests 2 units of R3t=2: requests 1 unit of R4t=4: requests 1 unit of R1t=6: releases 1 unit of R3t=8: FinishesProcess P3:t=0: requests 1 unit of R4t=2: requests 2 units of R1t=5: releases 2 units of R1t=7: requests 1 unit of R2t=8: requests 1 unit of R3t=9: FinishesWhich one of the following statements is TRUE if all three processes run concurrently starting at time t=0?a)All processes will finish without any deadlockb)Only P1 and P2 will be in deadlock.c)Only P1 and P3 will be in a deadlock.d)All three processes will be in deadlockCorrect answer is option 'A'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.Process P1:t=0: requests 2 units of R2t=1: requests 1 unit of R3t=3: requests 2 units of R1t=5: releases 1 unit of R2 and 1 unit of R1.t=7: releases 1 unit of R3t=8: requests 2 units of R4t=10: FinishesProcess P2:t=0: requests 2 units of R3t=2: requests 1 unit of R4t=4: requests 1 unit of R1t=6: releases 1 unit of R3t=8: FinishesProcess P3:t=0: requests 1 unit of R4t=2: requests 2 units of R1t=5: releases 2 units of R1t=7: requests 1 unit of R2t=8: requests 1 unit of R3t=9: FinishesWhich one of the following statements is TRUE if all three processes run concurrently starting at time t=0?a)All processes will finish without any deadlockb)Only P1 and P2 will be in deadlock.c)Only P1 and P3 will be in a deadlock.d)All three processes will be in deadlockCorrect answer is option 'A'. Can you explain this answer?.
Solutions for Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.Process P1:t=0: requests 2 units of R2t=1: requests 1 unit of R3t=3: requests 2 units of R1t=5: releases 1 unit of R2 and 1 unit of R1.t=7: releases 1 unit of R3t=8: requests 2 units of R4t=10: FinishesProcess P2:t=0: requests 2 units of R3t=2: requests 1 unit of R4t=4: requests 1 unit of R1t=6: releases 1 unit of R3t=8: FinishesProcess P3:t=0: requests 1 unit of R4t=2: requests 2 units of R1t=5: releases 2 units of R1t=7: requests 1 unit of R2t=8: requests 1 unit of R3t=9: FinishesWhich one of the following statements is TRUE if all three processes run concurrently starting at time t=0?a)All processes will finish without any deadlockb)Only P1 and P2 will be in deadlock.c)Only P1 and P3 will be in a deadlock.d)All three processes will be in deadlockCorrect answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.Process P1:t=0: requests 2 units of R2t=1: requests 1 unit of R3t=3: requests 2 units of R1t=5: releases 1 unit of R2 and 1 unit of R1.t=7: releases 1 unit of R3t=8: requests 2 units of R4t=10: FinishesProcess P2:t=0: requests 2 units of R3t=2: requests 1 unit of R4t=4: requests 1 unit of R1t=6: releases 1 unit of R3t=8: FinishesProcess P3:t=0: requests 1 unit of R4t=2: requests 2 units of R1t=5: releases 2 units of R1t=7: requests 1 unit of R2t=8: requests 1 unit of R3t=9: FinishesWhich one of the following statements is TRUE if all three processes run concurrently starting at time t=0?a)All processes will finish without any deadlockb)Only P1 and P2 will be in deadlock.c)Only P1 and P3 will be in a deadlock.d)All three processes will be in deadlockCorrect answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.Process P1:t=0: requests 2 units of R2t=1: requests 1 unit of R3t=3: requests 2 units of R1t=5: releases 1 unit of R2 and 1 unit of R1.t=7: releases 1 unit of R3t=8: requests 2 units of R4t=10: FinishesProcess P2:t=0: requests 2 units of R3t=2: requests 1 unit of R4t=4: requests 1 unit of R1t=6: releases 1 unit of R3t=8: FinishesProcess P3:t=0: requests 1 unit of R4t=2: requests 2 units of R1t=5: releases 2 units of R1t=7: requests 1 unit of R2t=8: requests 1 unit of R3t=9: FinishesWhich one of the following statements is TRUE if all three processes run concurrently starting at time t=0?a)All processes will finish without any deadlockb)Only P1 and P2 will be in deadlock.c)Only P1 and P3 will be in a deadlock.d)All three processes will be in deadlockCorrect answer is option 'A'. Can you explain this answer?, a detailed solution for Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.Process P1:t=0: requests 2 units of R2t=1: requests 1 unit of R3t=3: requests 2 units of R1t=5: releases 1 unit of R2 and 1 unit of R1.t=7: releases 1 unit of R3t=8: requests 2 units of R4t=10: FinishesProcess P2:t=0: requests 2 units of R3t=2: requests 1 unit of R4t=4: requests 1 unit of R1t=6: releases 1 unit of R3t=8: FinishesProcess P3:t=0: requests 1 unit of R4t=2: requests 2 units of R1t=5: releases 2 units of R1t=7: requests 1 unit of R2t=8: requests 1 unit of R3t=9: FinishesWhich one of the following statements is TRUE if all three processes run concurrently starting at time t=0?a)All processes will finish without any deadlockb)Only P1 and P2 will be in deadlock.c)Only P1 and P3 will be in a deadlock.d)All three processes will be in deadlockCorrect answer is option 'A'. Can you explain this answer? has been provided alongside types of Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.Process P1:t=0: requests 2 units of R2t=1: requests 1 unit of R3t=3: requests 2 units of R1t=5: releases 1 unit of R2 and 1 unit of R1.t=7: releases 1 unit of R3t=8: requests 2 units of R4t=10: FinishesProcess P2:t=0: requests 2 units of R3t=2: requests 1 unit of R4t=4: requests 1 unit of R1t=6: releases 1 unit of R3t=8: FinishesProcess P3:t=0: requests 1 unit of R4t=2: requests 2 units of R1t=5: releases 2 units of R1t=7: requests 1 unit of R2t=8: requests 1 unit of R3t=9: FinishesWhich one of the following statements is TRUE if all three processes run concurrently starting at time t=0?a)All processes will finish without any deadlockb)Only P1 and P2 will be in deadlock.c)Only P1 and P3 will be in a deadlock.d)All three processes will be in deadlockCorrect answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2 units). A non-preemptive resource allocation policy is used. At any given instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the sources as follows if executed independently.Process P1:t=0: requests 2 units of R2t=1: requests 1 unit of R3t=3: requests 2 units of R1t=5: releases 1 unit of R2 and 1 unit of R1.t=7: releases 1 unit of R3t=8: requests 2 units of R4t=10: FinishesProcess P2:t=0: requests 2 units of R3t=2: requests 1 unit of R4t=4: requests 1 unit of R1t=6: releases 1 unit of R3t=8: FinishesProcess P3:t=0: requests 1 unit of R4t=2: requests 2 units of R1t=5: releases 2 units of R1t=7: requests 1 unit of R2t=8: requests 1 unit of R3t=9: FinishesWhich one of the following statements is TRUE if all three processes run concurrently starting at time t=0?a)All processes will finish without any deadlockb)Only P1 and P2 will be in deadlock.c)Only P1 and P3 will be in a deadlock.d)All three processes will be in deadlockCorrect answer is option 'A'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
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