Output
Enter the number of processes: 3
Enter details for process 1
Process ID: 1
Arrival time: 0
Burst time: 3
Predicted time: 2
Enter details for process 2
Process ID: 3
Arrival time: 4
Burst time: 9
Predicted time: 6
Enter details for process 3
Process ID: 2
Arrival time: 4
Burst time: 10
Predicted time: 7
Process Arrival Time Burst Time Predicted Time Completion Time Turnaround Time Waiting Time
1 0 3 2 3 3 0
3 4 9 6 13 9 0
2 4 10 7 23 19 9
Average Turnaround Time: 10.333333333333334
Process ID: 4
Arrival time: 5
Burst time: 12
Predicted time: 9
Process Arrival Time Burst Time Predicted Time Completion Time Turnaround Time Waiting Time
1 0 5 4 5 5 0
2 3 9 6 14 11 2
3 4 10 7 24 20 10
4 5 12 9 36 31 19
Average Turnaround Time: 16.75
Average Waiting Time: 7.75
Shortest Remaining Time First (SRTF) With predicted Time
CPU scheduling algorithms are essential components of operating systems that determine the order in which processes are executed on a computer’s central processing unit (CPU). These algorithms aim to optimize CPU utilization, reduce waiting times, and enhance system performance by efficiently managing the execution of tasks in a multi-tasking environment. Various algorithms, such as First-Come, First-Served (FCFS), Shortest Job Next (SJN), Round Robin (RR), and Priority Scheduling, are employed to achieve these objectives, each with its own set of advantages and limitations. In this article, we study about Shortest Remaining Time First CPU Scheduling algorithm.
Contact Us