State 1 
| 
   
Processes   
 | 
  
   
P1 
   
 | 
  
   
P2  
 | 
  
   
 P3  
 | 
 
| 
   
Devices allocated  
 | 
  
   
2  
 | 
  
   
3 
 | 
  
   
4  
 | 
 
State 2 
| 
   
Processes  
 | 
  
   | 
  
   
P1 
 | 
  
   
P2  
 | 
  
   
P3  
 | 
 
| 
   
Devices  
 | 
  
   
allocated  
 | 
  
   
0 
 | 
  
   
2 
 | 
  
   
4 
 | 
 
Which of the following is correct ? 
(A) State 1 is unsafe and state 2 is
safe. 
(B) State 1 is safe and state 2 is
unsafe. 
(C) Both, state 1 and state 2 are
safe. 
(D) Both, state 1 and state 2 are
unsafe. 
Answer B.
Explanation.
State 1 
| 
   
Processes   
 | 
  
   
P1 
   
 | 
  
   
P2  
 | 
  
   
 P3  
 | 
 
| 
   
Devices allocated  
 | 
  
   
2  
 | 
  
   
3 
 | 
  
   
4  
 | 
 
| 
   
Max Demand 
 | 
  
   
4 
 | 
  
   
5 
 | 
  
   
8 
 | 
 
| 
   
Demand-Alloction 
 | 
  
   
2 
 | 
  
   
2 
 | 
  
   
4 
 | 
 
State 1 is safe  total demand-allocation is less than 10.(available)
State 2 
| 
   
Processes  
Devices  
allocated  
 | 
  
   
P1 
 | 
  
   
P2  
 | 
  
   
P3  
 | 
 
| 
   
0 
 | 
  
   
2 
 | 
  
   
4 
 | 
 |
| 
   
Max Demand 
 | 
  
   
4 
 | 
  
   
5 
 | 
  
   
8 
 | 
 
| 
   
Demand-Alloction 
 | 
  
   
4 
 | 
  
   
3 
 | 
  
   
4 
 | 
 
State 2  is unsafe because demand-allocation
is > 10(availability).
No comments:
Post a Comment
Note: only a member of this blog may post a comment.