CS FundamentalsHardGATE CS
Processes (arrival, burst): P1 (0, 3), P2 (1, 5), P3 (2, 2), P4 (4, 4). Which statement about the average waiting time is correct?
- A. SRTF gives a strictly smaller average than non-preemptive SJF
- B. Non-preemptive SJF and SRTF both give 2.5 ms, while FCFS gives 3.5 ms
- C. RR (q = 2) gives 2.5 ms, the same as SRTF
- D. FCFS gives 2.5 ms, the same as non-preemptive SJF
Correct answer: B. Non-preemptive SJF and SRTF both give 2.5 ms, while FCFS gives 3.5 ms
Computed averages: FCFS 3.5, SJF 2.5, SRTF 2.5, RR (q=2) 4.75. SRTF can never be worse than non-preemptive SJF, but here no arrival ever has a shorter burst than the remaining time of the running job, so it never preempts and both coincide.
More Operating Systems questions
- Round Robin is used with quantum q = 10 ms and context-switch time s = 2 ms. All processes are CPU-bound with very long bursts, and the…
- Round Robin with quantum q and context-switch time s is used; every process does exactly one CPU burst of T ms with T < q. What is the CPU…
- Processes (arrival, burst): P1 (0, 5), P2 (1, 3), P3 (3, 6), P4 (4, 2), P5 (10, 4), scheduled by SRTF. During the first 12 ms (time 0 to…
- Round Robin with quantum 3 ms; processes (arrival, burst): P1 (0, 8), P2 (2, 5), P3 (4, 2), P4 (6, 4). A process arriving at the instant a…
- SJF predicts the next CPU burst by exponential averaging: τ(n+1) = α·t(n) + (1 − α)·τ(n), with α = 0.75 and initial guess τ(1) = 10 ms…
- Four processes arrive at time 0 in the order A (6), B (3), C (1), D (7) (bursts in ms) and are scheduled Round Robin with no switching…