CS FundamentalsHardGATE CS (PYQ pattern)

Three tasks share two resources under the priority ceiling protocol (priorities t1 > t2 > t3). t3 has a 4 ms critical section on R1 and a 6 ms critical section on R2; t2 has a 3 ms critical section on R2; t1 has a 2 ms critical section on R1. The ceiling of R1 is the priority of t1 and the ceiling of R2 is the priority of t2. What is the maximum time t2 can be blocked by lower-priority tasks in one release?

  1. A. 10 ms
  2. B. 4 ms
  3. C. 9 ms
  4. D. 6 ms

Correct answer: D. 6 ms

Under PCP a task is blocked for at most the duration of ONE critical section of a lower-priority task whose resource ceiling is at least its own priority. For t2 the candidates are t3's R1 section (4 ms, ceiling t1) and R2 section (6 ms, ceiling t2); the longest is 6 ms. Adding them (10 ms) is the plain-inheritance trap.

More Operating Systems questions

Exams that ask this topic