Consider the following snapshot of a system running 𝑛 concurrent processes. Process 𝑖 is holding 𝑋𝑖 instances of a resource R, 1 ≀ 𝑖 ≀ 𝑛. Assume that all instances of R are currently in use

Q. Consider the following snapshot of a system running 𝑛 concurrent processes. Process 𝑖 is holding 𝑋𝑖 instances of a resource R, 1 ≀ 𝑖 ≀ 𝑛. Assume that all instances of R are currently in use. Further, for all 𝑖, process 𝑖 can place a request for at most π‘Œπ‘– additional instances of R while holding the 𝑋𝑖 instances it already has. Of the 𝑛 processes, there are exactly two processes 𝑝 and π‘ž such that π‘Œπ‘ = π‘Œπ‘ž = 0. Which one of the following conditions guarantees that no other process apart from 𝑝 and π‘ž can complete execution?

(A) 𝑋𝑝 + π‘‹π‘ž < Min {π‘Œπ‘˜ | 1 ≀ π‘˜ ≀ 𝑛 , k β‰  p, k β‰  q}

(B) 𝑋𝑝 + π‘‹π‘ž < Max {π‘Œπ‘˜ | 1 ≀ π‘˜ ≀ 𝑛 , k β‰  p, k β‰  q}

(C) Min (𝑋𝑝 , π‘‹π‘ž) β‰₯ Min {π‘Œπ‘˜ | 1 ≀ π‘˜ ≀ 𝑛 , k β‰ p, k β‰  q}

(D) Min (𝑋𝑝, π‘‹π‘ž) ≀ Max {π‘Œπ‘˜ | 1 ≀ π‘˜ ≀ 𝑛 , k β‰  p, k β‰  q}

Ans: XpΒ + XqΒ < Min {Yk ⏐ 1 ≀ k ≀ n, k β‰  p, k β‰  q}

Solution:

Xi β†’ Holding resources for process pi,

Yi β†’ Additional resources for process pi.

As process p and q doesn’t require any additional resources, it completes its execution and available resources are (Xp + Xq)

There are (n – 2) process pi (1< i < n, i β‰  p, q) with their requirements as Yi (1 < i < n, i β‰  p, q). In order to not execute process pi, no instance of Yi should be satisfied with (Xp + Xq) resources, i.e., minimum of Yi instances should be greater than (Xp + Xq).

Take Mock Tests

Government Schemes Mock Test Start Test!
Political Science Mock Test – 42 Start Test
History Test – 190 Start Test
Quantitative Aptitude Test Start Test!
Data Interpretation - Mock Test Start Test!
General Awareness - Mock Test Start Test!
Reasoning Ability - Mock Test Start Test!

We will be happy to hear your thoughts

Leave a reply

Gkseries.com
Logo
Register New Account