The Gateway to Computer Science Excellence
+3 votes

An operating system has $13$ tape drives. There are three processes $P1, P2$ & $P3$. Maximum requirement of $P1$ is $11$ tape drives, $P2$ is $5$ tape drives and $P3$ is $8$ tape drives. Currently, $P1$ is allocated $6$ tape drives, $P2$ is allocated $3$ tape drives and $P3$ is allocated $2$ tape drives. Which of the following sequences represent a safe state? 

  1. $P2 P1 P3$
  2. $P2 P3 P1$
  3. $P1 P2 P3$
  4. $P1 P3 P2$ 
in Operating System by Boss (31.2k points)
recategorized by | 1.1k views

1 Answer

+2 votes
Best answer
allocated    Max   need

P1     6            11       5

P2     3            5        2                       total resource =13  AND  free resources =13-11=2   so clearly these 2 can only be given

P3     2            8        6                     to P2 which will be completed and release its all 5 resource then next  P1 can take 5 resource and be completed and finally P3

so right ans is choice 1  P2P1P3
by Boss (49.4k points)
selected by

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,834 questions
57,838 answers
108,331 users