Similar questions 7 more →
CPU Scheduling


Answer & solution
Answer: A (no official key was published)
Step through it (7 steps)
1. A valid SRPT schedule is P1:[0,1), P2:[1,4), P4:[4,5), P3:[5,8), P1:[8,12). P2 still has the smallest remaining time when P3 arrives.
2. Completion times for P1,P2,P3,P4 are 12,4,8,5; subtracting arrivals 0,1,2,4 gives turnaround times 12,3,6,1. Their mean is 22/4=5.50ms.
3. Teaching check: Turnaround is completion minus arrival, not total waiting time. The four turnaround values are 12,3,6,1; their sum is 22. Context-switch overhead is not supplied and is therefore excluded. Arrival of P3 at time 2 does not preempt P2, whose remaining burst is only 2.