Question

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

Option 2 : grant the request because the system remains safe and P1 can finish first / अनुरोध स्वीकार करना चाहिए क्योंकि सिस्टम सुरक्षित रहता है और P1 सबसे पहले समाप्त हो सकता है

Advertisement

Detailed Solution

सही उत्तर grant the request because the system remains safe and P1 can finish first / अनुरोध स्वीकार करना चाहिए क्योंकि सिस्टम सुरक्षित रहता है और P1 सबसे पहले समाप्त हो सकता है है।

Key Points
Helpful?
PrepSnapprepsnap.in • Part -A

Question:

A system with 3 resource types has Available = (3,3,2). Allocation and Max matrices are: P0: Alloc(0,1,0) Max(7,5,3); P1: Alloc(2,0,0) Max(3,2,2); P2: Alloc(3,0,2) Max(9,0,2); P3: Alloc(2,1,1) Max(2,2,2); P4: Alloc(0,0,2) Max(4,3,3). P1 now requests (1,0,2). Applying the Banker's algorithm, the system should ___ / 3 संसाधन प्रकारों वाले सिस्टम में Available = (3,3,2) है। Allocation और Max मैट्रिक्स हैं: P0: Alloc(0,1,0) Max(7,5,3); P1: Alloc(2,0,0) Max(3,2,2); P2: Alloc(3,0,2) Max(9,0,2); P3: Alloc(2,1,1) Max(2,2,2); P4: Alloc(0,0,2) Max(4,3,3)। P1 अब (1,0,2) का अनुरोध करता है। Banker's एल्गोरिद्म लागू करने पर सिस्टम को ___

1.
deny the request because it exceeds P1's maximum claim / अनुरोध अस्वीकार करना चाहिए क्योंकि यह P1 के अधिकतम दावे से अधिक है
2.
grant the request because the system remains safe and P1 can finish first / अनुरोध स्वीकार करना चाहिए क्योंकि सिस्टम सुरक्षित रहता है और P1 सबसे पहले समाप्त हो सकता है
3.
grant the request, but only P3 can finish first afterwards / अनुरोध स्वीकार करना चाहिए, लेकिन इसके बाद केवल P3 ही सबसे पहले समाप्त हो सकता है
4.
deny the request because available resources are insufficient / अनुरोध अस्वीकार करना चाहिए क्योंकि उपलब्ध संसाधन अपर्याप्त हैं

Correct Answer: grant the request because the system remains safe and P1 can finish first / अनुरोध स्वीकार करना चाहिए क्योंकि सिस्टम सुरक्षित रहता है और P1 सबसे पहले समाप्त हो सकता है

P1's Need = Max - Alloc = (1,2,2). Request (1,0,2) is within both Need and Available (3,3,2). After granting, Available = (2,3,0) and P1's new Need = (0,2,0), which fits Available, so P1 can finish first; the state remains safe. / P1 की Need = Max - Alloc = (1,2,2)। अनुरोध (1,0,2) Need और Available (3,3,2) दोनों के भीतर है। स्वीकृति के बाद Available = (2,3,0) और P1 की नई Need = (0,2,0), जो Available में समाती है, अतः P1 सबसे पहले समाप्त हो सकता है; अवस्था सुरक्षित रहती है।

Downloaded from PrepSnap (prepsnap.in)