Nine Five And Two

Three jobs arrive on a single CPU. The scheduler is STCF (preemptive shortest time-to-completion first) and preempts the instant a shorter-remaining job becomes runnable. Context switches are free.

Job Arrival (ms) Run time (ms)
A 0 9
B 2 5
C 2 2

Recall Tturnaround=Tcompletion−TarrivalT_{turnaround} = T_{completion} - T_{arrival} and Tresponse=Tfirstrun−TarrivalT_{response} = T_{firstrun} - T_{arrival}.

What are the average turnaround time and the average response time?

A

Turnaround 9.67 ms, response 2.00 ms

B

Turnaround 8.33 ms, response 0.67 ms

C

Turnaround 11.67 ms, response 6.33 ms

D

Turnaround 10.67 ms, response 5.33 ms