SJF (non-preemptive) implementaion in C
Simulating SJF non-preemptive CPU scheduling algorithms to find turnaround time and waiting time
We are given with n processed with there arrival time and burst time,task is to find average waiting time and average turn around time.
This algorithm is similar to that of the FCFC but we need to sort the processes to obtain minimum waiting time or based on burst time while executing a process
Things to remember
- SJF results in minimum waiting time since all processes are sorted based on burst time
- Chance of Starvation (A process may be keep on postponed can be solved by using Aging)
- Impractical to be used in an Operating System since the burst time cant be predicted
Comments
Post a Comment