Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose we use the Banker's Algorithm to avoid deadlock. Consider a system that has 5 processes P_1, P_2, P_3, P_4, P_5 and four types of

image text in transcribed

Suppose we use the Banker's Algorithm to avoid deadlock. Consider a system that has 5 processes P_1, P_2, P_3, P_4, P_5 and four types of resources a, b, c and d; it has 6 units of a, 3 units of b, 4 units of c, 2 units of d. The matrix EXISTING[] denotes the existing resource units and is always (6 3 4 2). AVAILABLE[] the units available for allocation; ALLOCATE[] denotes the units that have been allocated to the processes; NEED[] denotes the units that may still be needed by the processes to complete the tasks. Suppose at a certain state the matrices are as shown below. EXISTING = (6 3 4 2) ALLOCATED = (2 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0) P_1 P_2 P_3 P_4 P_5 NEED = (1 0 2 1 1 1 1 0 2 1 0 1 1 1 0 1 1 0 0 0) a) What is the AVAILABLE matrix? b) Is the system in a safe state? Why? c) If P_4 makes a request of (0 1 0 0), should the system grant the request? (If not, what should the system do?) You must show your steps clearly to prove that your answer is correct

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions