Consider the following processes, with the arrival time and the length of the…
2016
Consider the following processes, with the arrival time and the length of the CPU burst given in milliseconds. The scheduling algorithm used is preemptive shortest remaining-time first.

The average turn around time of these processes is __________ milliseconds.
Attempted by 161 students.
Show answer & explanation
Correct answer: 8.25
Final answer: Average turnaround time = 8.25 milliseconds (rounded to 8.2 ms).
Steps to compute:
Simulate the preemptive shortest remaining-time first scheduling and record the timeline:
0 to 3: Process P1 runs (its remaining time goes from 10 to 7).
3 to 7: Process P2 runs (6 → 2 remaining) because it has shorter remaining time than P1.
7 to 8: Process P3 arrives (burst 1) and runs to completion at time 8.
8 to 10: The remaining part of P2 (2) runs and completes at time 10.
10 to 13: Process P4 (burst 3) runs and completes at time 13.
13 to 20: Remaining P1 (7) runs and completes at time 20.
Compute completion times and turnaround times (turnaround = completion time − arrival time):
P1: completion = 20 → turnaround = 20 − 0 = 20 ms
P2: completion = 10 → turnaround = 10 − 3 = 7 ms
P3: completion = 8 → turnaround = 8 − 7 = 1 ms
P4: completion = 13 → turnaround = 13 − 8 = 5 ms
Calculate the average turnaround time:
Average = (20 + 7 + 1 + 5) / 4 = 33 / 4 = 8.25 ms
Rounded to one decimal place: 8.2 ms
A video solution is available for this question — log in and enroll to watch it.