CPU Scheduling

Answer & solution
Official answer: D
With quantum 4, A, B, C each give execution segments P, Q, R, S, Q, R, Q: P and S finish in their first turn, R in its second, and Q in its third. This yields two Q→R switches, one R→Q and one S→Q. For D, burst times (3, 7, 7, 3) instead give P, Q, R, S, Q, R: Q finishes on its second turn, leaving no final R→Q switch. Thus D cannot produce the stated trace.
For option D the slices have lengths 3,4,4,3,3,3 respectively. The running order P,Q,R,S,Q,R has Q→R twice and S→Q once, but no R→Q. For A the slice lengths are 4,4,4,2,4,2,2, so P,Q,R,S,Q,R,Q satisfies all stated counts. B,C have that same order because Q needs three turns and R two.