![]() ![]() Ask the user for process id and burst time for all n processes and store them into pid and bt respectively.Ĥ. Ask the user for number of processes n.ģ. Initialize two array pid and bt of size 20.Ģ. printf ( " \nAverage Turnaround Time=%f" ,avg_tat ) ġ.printf ( " \n \nAverage Waiting Time=%f" ,avg_wt ).printf ( " \np%d \t \t %d \t \t %d \t \t \t%d" ,p ,bt ,wt ,tat ).//turnaround time of individual processes.printf ( " \nProcess \t Burst Time \tWaiting Time \tTurnaround Time" ).//individual WT by adding BT of all previous completed processes. ![]() //finding the waiting time of all the processes.printf ( "Enter number of process:" ).int bt ,p ,wt ,tat ,i ,j ,n ,total = 0 ,totalT = 0 ,pos ,temp.* C Program to Implement SJF Scheduling.
0 Comments
Leave a Reply. |