An operating system contains 3 user processes, each requiring 2 units of…
2017
An operating system contains 3 user processes, each requiring 2 units of resource R. The minimum number of units of R such that no deadlock will ever occur is
- A.
5
- B.
2
- C.
3
- D.
4
Attempted by 450 students.
Show answer & explanation
Correct answer: D
To avoid deadlock:
Minimum resources=n×(m−1)+1
Where
n=3(processes)
m=2 (max resources per process)
=3×(2−1)+1
=3+1=4