Question

1.
2.
3.
4.
Answer (Detailed Solution Below)

Option 4 : P1, P3, P4, P0, P2 / P1, P3, P4, P0, P2

Advertisement

Detailed Solution

सही उत्तर P1, P3, P4, P0, P2 / P1, P3, P4, P0, P2 है।

Key Points
Helpful?
PrepSnapprepsnap.in • Part -A

Question:

A server manages 3 resource types with 10, 5 and 7 instances. Allocation is P0 (0,1,0), P1 (2,0,0), P2 (3,0,2), P3 (2,1,1), P4 (0,0,2); maximum claims are P0 (7,5,3), P1 (3,2,2), P2 (9,0,2), P3 (2,2,2), P4 (4,3,3); Available = (3,3,2). Which of these is a safe sequence under Banker's algorithm? / एक सर्वर 3 संसाधन प्रकारों (10, 5, 7 इंस्टेंस) का प्रबंधन करता है। आवंटन P0 (0,1,0), P1 (2,0,0), P2 (3,0,2), P3 (2,1,1), P4 (0,0,2); अधिकतम दावे P0 (7,5,3), P1 (3,2,2), P2 (9,0,2), P3 (2,2,2), P4 (4,3,3); उपलब्ध = (3,3,2)। बैंकर एल्गोरिदम के अनुसार कौन-सा सुरक्षित अनुक्रम है?

1.
P0, P1, P2, P3, P4 / P0, P1, P2, P3, P4
2.
P1, P2, P3, P4, P0 / P1, P2, P3, P4, P0
3.
P2, P4, P3, P1, P0 / P2, P4, P3, P1, P0
4.
P1, P3, P4, P0, P2 / P1, P3, P4, P0, P2

Correct Answer: P1, P3, P4, P0, P2 / P1, P3, P4, P0, P2

Need = Max - Allocation gives P0 (7,4,3), P1 (1,2,2), P2 (6,0,0), P3 (0,1,1), P4 (4,3,1). With Available (3,3,2): P1's need fits, releasing to (5,3,2); then P3 fits, releasing to (7,4,3); then P4 fits, releasing to (7,4,5); then P0 fits, releasing to (7,5,5); finally P2 fits. Hence P1, P3, P4, P0, P2 is safe. In (b), P2's need (6,0,0) exceeds the available (5,3,2) at the second step, so that sequence fails. / नीड मैट्रिक्स से P1, फिर P3, फिर P4, फिर P0, अंत में P2 चल सकता है; यही सुरक्षित अनुक्रम है।

Downloaded from PrepSnap (prepsnap.in)