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?
- A. 10 ms
- B. 4 ms
- C. 9 ms
- 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
- Rate-monotonic tasks (C, T = D, worst-case blocking B): t1 (2, 5, 2), t2 (2, 8, 2), t3 (4, 12, 0). Response time R = C + B + sum over…
- Eight independent jobs with lengths 7, 6, 5, 5, 4, 3, 3, 2 are scheduled on 3 identical processors by LPT (longest job first onto the…
- Rate-monotonic tasks (C, period = deadline) T1 (1, 3), T2 (1, 5), T3 (3, 15) are released together at t = 0. How many times is T3…
- Two CPU-bound processes alternate on one core, 100 context switches per second. Each has a 40-page working set in the TLB (64 entries)…
- A thread runs on node 0 of a 4-node NUMA machine. Access latency is 80 ns to node 0, 140 ns to nodes 1 and 2 (one hop) and 200 ns to node…
- A physically indexed 1 MB, 8-way set-associative L2 cache with 64-byte lines sits under a system with 4 KB pages and 4 GB of RAM. How many…