- Q 2 A System Has 3 Resource Types A 8 Instances B 7 Instances And C 7 Instances Suppose At Time T The Allocati 1 (32.46 KiB) Viewed 15 times
Q.2 A system has 3 resource types A (8 instances), B (7 instances) and C (7) instances). Suppose at time t, the allocati
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Q.2 A system has 3 resource types A (8 instances), B (7 instances) and C (7) instances). Suppose at time t, the allocati
Q.2 A system has 3 resource types A (8 instances), B (7 instances) and C (7) instances). Suppose at time t, the allocation and maximum need matrices are as follows: Allocation Need ABC Available ABC ABC Maximum ABC 436 044 PL 110 326 021 023 111 311 422 163 002 161 210 522 (a) Determine whether or not the system is in a safe atate. It no. give reasons. If yes, give a safe sequence. Also, provide elements of Need matrix and Available vector. Safe sequence: < P2, P3, PS, P4, P1> (b) If process 24 now requests 2 units of resource C. should the request be granted? Why? The request would be rejected as an error because process P4 initially declared that it would never need more than 3 instances of C and it has already been granted 2 instances of C. (c) What must the Banker's algorithm know a priori in order to avoid deadlock? Each process must declare the maximum number of instances of each resource type that it may need. This number may not exceed the total number of resources in the system. (d) Describe the general strategy behind deadlock prevention. At least one of the following conditions cannot hold to prevent the occurrence of a deadlock. Conditions: Mutual exclusion, hold and wait, no pre-emption, circular wait