GATE - 1997 | OS | An operating system contains 3 user processes each requiring 2 units

GATE - 1997 | OS | An operating system contains 3 user processes each requiring 2 units
Posted on 01-03-2022

GATE - 1997 [Operating System]

Question:

An operating system contains 3 user processes each requiring 2 units of resource R. the minimum number of units of r such that no deadlocks will ever arise is

A

3

B

5

C

4

D

6

Solution:

Option (C) is Correct.

For the system to cause deadlock give each process 1 resource less than they require.

Since in this case they require 2 resource each, so just give them 1 resource each.

So if at max if 3 resource will be available then there can be deadlock.

So by adding one more resource deadlock will never occur.

So in total minimum 4 resources are required so that deadlock will never occur.

 

 

Thank You

Download App for Free PDF Download

GovtVacancy.Net Android App: Download

government vacancy govt job sarkari naukri android application google play store https://play.google.com/store/apps/details?id=xyz.appmaker.juptmh