in Operating System edited by
216 views
0 votes
0 votes
Consider an operating system containing $n$ processes each requiring $4$ resources. The maximum number of processes that can be executed without any deadlock if there are $21$ resources is available  ______
in Operating System edited by
by
216 views

1 Answer

1 vote
1 vote
Best answer

The standard Rule is :

  A system with m resources of same type being shared by n processes.  Resources can be requested and released by processes only on at a time . 

The system is deadlock free if and only if --> The sum of all max needs is < m+n " 

Now here in this question 

1. n processes each requiring 4 resources. So  total maximum need  are 4n.

2. There are 21 resources are in total which is shared by n processes.

so applying above stated Rule 

4n < 21+n 

=> 3n< 21 

=> n < 7 hence number of process must be less than 7 , which is 6 at maximum .( asked in the question) .

selected by

4 Comments

is thiz standard formula ?
0
0

 The system is deadlock free if and only if 

The sum of all max needs is < m+n 

This Rule use here.

0
0
i know what is banker algo ....tell wht u want to say.
0
0

yes @wanted , please see what i did here, 

The standard Rule is :

  A system with m resources of same type being shared by n processes.  The system is deadlock free if and only if --> The sum of all max needs is < m+n " 

Now here in this question 

1. n processes each requiring 4 resources. So  total maximum need  are 4n.

2. There are 21 resources are in total which is shared by n processes.

so applying above stated Rule 

4n < 21+n 

=> 3n< 21 

=> n < 7 hence number of process must be less than 7 , which is 6 ( as maximum no of process can be executed asked in the question ).

0
0
Answer:

Related questions