Professional Documents
Culture Documents
Different Between SJF & FCFS: 1. Page 35, Use FCFS. Show Your Calculation, Compare With SJF. Which One Is Better, Why?
Different Between SJF & FCFS: 1. Page 35, Use FCFS. Show Your Calculation, Compare With SJF. Which One Is Better, Why?
Different Between SJF & FCFS: 1. Page 35, Use FCFS. Show Your Calculation, Compare With SJF. Which One Is Better, Why?
P1 P2 P3 P4
0 6 14 21 24
2. Turnaround Time
The assumption is that with FCFS, average time and turnaround time is at in maximum level.
SJF has been shown to be the fastest and smallest scheduling algorithm.
1. Page 41, use FCFS. Show your calculation, compare with SJF. Which one is better, why?
A B C D X Y
0 5 7 13 17 20 21
a) FCFS - Average Wait Time is (0 + 5 + 7 + 13 + 17 + 20) / 6 = 10.33 ms, and for the SJN -
Average Waiting Time is = 5.33ms,
b) FCFS - Turnaround Time is = (5 + 7 + 13 + 17 + 18 + 19) / 6 = 13.16 ms, and for the SJN-
Turnaround Time is = 8.83 ms,