B should be answer??

The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

0 votes

Let there are 10 resources in the system and every process can demand maximum 4 and minimum 2 resources of the same type then what is the minimum and the maximum number of processes in a system such that system is deadlock-free in which all resources are busy.

A. 2 & 5

B. 3 & 9

C. 4 & 9

D. 3 & 5

A. 2 & 5

B. 3 & 9

C. 4 & 9

D. 3 & 5

+1 vote

Answer is B

If each required at max 4 resources then by giving 3-3-3 resources each to 3 process and 1 remaining to anyone will simply make this system deadlock free.

If each process required min 2 resources than by giving 1 resource to each 9 processes and remaining 1 resource to any process will satisfy its need and system will be deadlock free.

Hence minimum processes = 3, maximum processes = 9

If you need formula then

**MD = max demand -1 = 4-1 = 3**

**MN = min demand -1 = 2-1 =1**

**for min number of processes = ceil(Resources/MD) -1 = ceil (10/3) - 1 = 4-1 =3**

**for max number of processes = ceil (Resources/MN) -1 = ceil(10/1) -1 = 10-1 =9 **

- All categories
- General Aptitude 1.3k
- Engineering Mathematics 5.2k
- Digital Logic 2k
- Programming & DS 3.7k
- Algorithms 3.2k
- Theory of Computation 4k
- Compiler Design 1.6k
- Databases 3k
- CO & Architecture 2.6k
- Computer Networks 3k
- Non GATE 1k
- Others 1.3k
- Admissions 484
- Exam Queries 434
- Tier 1 Placement Questions 17
- Job Queries 56
- Projects 8

36,075 questions

43,521 answers

123,662 comments

42,747 users