CPU Scheduling - Merged
CPU Scheduling - Merged
ASSIGNMENT
CPU scheduling
Prepared to:
M d. M u r ad H os s ai n
ID : 2231081044
5 9 t h Bat ch
CPU scheduling is the process of managing how processes are allocated to the
CPU, determining the order in which processes will execute based on their arrival
and priority, while optimizing overall system performance.
CPU scheduling is two type
Calculations (FCFS)
Average Turnaround Time: (6 + 12 + 17 + 18 + 21) / 5 = 74 / 5 = 14.8
Calculations (SJF)
Average Turnaround Time: (6 + 3 + 6 + 17 + 27) / 5 = 59 / 5 = 11.8
Calculations
Average Turnaround Time: (8 + 13 + 23 + 20 + 25) / 5 = 89 / 5 = 17.8
Gantt Chart
| P2 |---| P3 |------| P1 |------| P5 |---| P4 |
Shortest Remaining Time First (SRTF) Scheduling Algorithm
Calculations (SRTF)
Average Turnaround Time: (6 + 13 + 18 + 3 + 9) / 5 = 49 / 5 = 9.8
Calculations (RR)
Average Turnaround Time: (14 + 18 + 19 + 3 + 9) / 5 = 63 / 5 = 12.6