CS FundamentalsHardGATE CS (PYQ pattern)
Two periodic tasks with deadline = period and zero release offset: T1 (C=2, P=5) and T2 (C=4, P=7). Total utilisation is 2/5 + 4/7 ≈ 0.971. Consider: (I) under rate-monotonic scheduling T2 misses a deadline; (II) under EDF all deadlines are met; (III) because the utilisation is below 1, the set is RMS-schedulable; (IV) because 0.971 exceeds the Liu–Layland bound 2(√2−1) ≈ 0.828, RMS must fail on every such pair of tasks. Which are correct?
- A. I and II only
- B. I only
- C. II and III only
- D. I, II and IV only
Correct answer: A. I and II only
RMS: T1 runs 0-2, T2 runs 2-5 (3 units done), T1's second job runs 5-7, so T2 still has 1 unit left at its deadline t=7 and misses. EDF is optimal for U ≤ 1, so it succeeds. The Liu–Layland bound is sufficient, not necessary, so (IV) is wrong; (III) is wrong since U ≤ 1 only guarantees EDF.
More Operating Systems questions
- Three periodic tasks (deadline = period, all released at t=0) are scheduled by preemptive rate-monotonic scheduling: T1 (C=2, P=5), T2…
- Two processes use shared variables flag[2] (initially 0) and turn. Process i (j = 1−i) runs: V1: flag[i]=1; turn=j; while(flag[j] &&…
- Binary semaphore m is initialised to 1. P1: P(m); print A; V(m); print B. P2: P(m); print C; V(m); print D. P3: P(m); print E; V(m). All…
- Priority-based preemptive scheduling with L (low), M (medium), H (high). L arrives at t=0 and needs 10 units; at t=1 L locks a mutex and…
- A C program runs: int i; for(i=0;i<4;i++){ if(fork()==0 && i%2==0) break; } printf("X"); Every process, including the original, reaches…
- Banker's algorithm with 3 resource types. Available = (1,1,1). Allocation rows P0..P3: (1,0,1), (0,2,0), (2,1,0), (1,1,1); Maximum rows…