What is the average turnaround time for these processes with the FCFS scheduling algorithm?Īverage Turnaround Time: ( (8-0)+(12-0.4)+(13-1.0) ) / 3 = 10.53 This makes the ssds to use the algorithm of fcfs (first come first serve). Ssds do not have any any moveable part or rotating disk. The first-come, first-served (FCFS) algorithm is fine for most _ systems.Įxplain why ssds often use an fcfs disk-scheduling algorithm? ("average turnaround time:"+(avgta/n)) // printing average turnaround time. ("\naverage waiting time: "+ (avgwt/n)) // printing average waiting time. (processid + " \t " + arrival_time + "\t" + burst_time + "\t" + completion_time + "\t" + trunaround_time + "\t" + waiting_time ) ("\npid arrival brust complete turn waiting") Waiting_time = trunaround_time - burst_time // waiting time= turnaround time- burst timeĪvgwt += waiting_time // total waiting timeĪvgta += trunaround_time // total turnaround time Trunaround_time = completion_time - arrival_time // turnaround time= completion time- arrival time finding completion times for each processĬompletion_time = arrival_time + burst_time Ĭompletion_time = completion_time + burst_time TurnAroundTime=BurstTime+WaitingTime ĪverageTurnAroundTime+=TurnAroundTime Ĭout<<"\nProcess"<<"\t\t"<