• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
July 04, 2022 |410 Views

Program for FCFS Scheduling | Set 1

  Share   Like
Description
Discussion

Given n processes with their burst times, the task is to find average waiting time and average turn around time using FCFS scheduling algorithm. 


First in, first out (FIFO), also known as first come, first served (FCFS), is the simplest scheduling algorithm. FIFO simply queues processes in the order that they arrive in the ready queue. 


In this, the process that comes first will be executed first and next process starts only after the previous gets fully executed. 
Here we are considering that arrival time for all processes is 0.

How to compute below times in Round Robin using a program?  

Completion Time: Time at which process completes its execution.


Turn Around Time: Time Difference between completion time and arrival time. Turn Around Time = Completion Time – Arrival Time


Waiting Time(W.T): Time Difference between turn around time and burst time. 


Waiting Time = Turn Around Time – Burst Time

Program for FCFS Scheduling  Set 1 : https://www.geeksforgeeks.org/program-for-fcfs-cpu-scheduling-set-1/