• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Deadlock

Question 11

A total of 9 units of a resource type available, and given the safe state shown below, which of the following sequence will be a safe state?
Process   Used    Max
  P1        2      7
  P2        1      6
  P3        2      5
  P4        1      4
  • (P4, P1, P3, P2)
  • (P4, P2, P1, P3)
  • (P4, P2, P3, P1)
  • (P3, P1, P2, P4)

Question 12

When a process is rolled back as a result of deadlock the difficulty which arises is
  • Starvation
  • System throughput
  • Low device utilization
  • Cycle stealing

Question 13

Consider a system having m resources of the same type. These resources are shared by 3 processes A, B, C which have peak time demands of 3, 4, 6 respectively. The minimum value of m that ensures deadlock will never occur is
  • 11
  • 12
  • 13
  • 14

Question 14

In which of the following four necessary conditions for deadlock processes claim exclusive control of the resources they require?
  • no preemption
  • mutual exclusion
  • circular wait
  • hold and wait

Question 15

Consider a system having "n" resources of same type. These resources are shared by 3 processes, A, B, C. These have peak demands of 3, 4, and 6 respectively. For what value of "n" deadlock won\'t occur
  • 15
  • 9
  • 10
  • 11

Question 16

Consider the following process and resource requirement of each process.
                 Type 1        Type 2
Process         Used  Max      Used  Max
   P1            1     2         1    3
   P2            1     3         1    2
   P3            2     4         1    4 
Predict the state of this system, assuming that there are a total of 5 instances of resource type 1 and 4 instances of resource type 2.
  • Can go to safe or unsafe state based on sequence
  • Safe state
  • Unsafe state
  • Deadlock state

Question 17

Suppose n processes, P1, …. Pn share m identical resource units, which can be reserved and released one at a time. The maximum resource requirement of process Pi is Si, where Si > 0. Which one of the following is a sufficient condition for ensuring that deadlock does not occur?
  • A
  • B
  • C
  • D

Question 18

Consider the following snapshot of a system running n processes. Process i is holding Xi instances of a resource R, 1 <= i <= n. currently, all instances of R are occupied. Further, for all i, process i has placed a request for an additional Yi instances while holding the Xi instances it already has. There are exactly two processes p and q such that Yp = Yq = 0. Which one of the following can serve as a necessary condition to guarantee that the system is not approaching a deadlock?
  • min (Xp, Xq) < max (Yk) where k != p and k != q
  • Xp + Xq >= min (Yk) where k != p and k != q
  • max (Xp, Xq) > 1
  • min (Xp, Xq) > 1

Question 19

Processes P1 and P2 use critical_flag in the following routine to achieve mutual exclusion. Assume that critical_flag is initialized to FALSE in the main program.
get_exclusive_access ( ) { if (critical _flag == FALSE) { critical_flag = TRUE ; critical_region () ; critical_flag = FALSE; } } Consider the following statements.
i. It is possible for both P1 and P2 to access critical_region concurrently.
ii. This may lead to a deadlock.
Which of the following holds?
  • (i) is false and (ii) is true
  • Both (i) and (ii) are false
  • (i) is true and (ii) is false
  • Both (i) and (ii) are true

Question 20

A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is _________.
  • 6
  • 7
  • 8
  • 9

There are 42 questions to complete.

Last Updated :
Take a part in the ongoing discussion