StreakPeaked· Practice

ExamsGATETechnical

Consider the following snapshot of a system running n concurrent processes. Process i is holding X_i instances of a resource R, 1 ≤ i ≤ n. Assume that all instances of R are currently in use. Further, for all i, process i can place a request for up to Y_i additional instances of R while holding the X_i instances it already has. Of the n processes, there are exactly two processes p and q such that Yₚ = Y_q = 0. Which one of the following conditions guarantees that no other process apart from p and q can complete execution?

  1. Xₚ + X_q < Min {Yₖ | 1 ≤ k ≤ n, k ≠ p, k ≠ q}
  2. Xₚ + X_q < Max {Yₖ | 1 ≤ k ≤ n, k ≠ p, k ≠ q}
  3. Min (Xₚ, X_q) ≤ Min {Yₖ | 1 ≤ k ≤ n, k ≠ p, k ≠ q}
  4. Min (Xₚ, X_q) ≤ Max {Yₖ | 1 ≤ k ≤ n, k ≠ p, k ≠ q}

Correct answer: Xₚ + X_q < Min {Yₖ | 1 ≤ k ≤ n, k ≠ p, k ≠ q}

Solution

This condition ensures that the total resources held by processes p and q are less than the minimum resources that any other process can request, effectively preventing those processes from obtaining the resources they need to proceed, thus blocking their execution.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →