Write a C program to perform First Come First Serve Algorithm

By | December 3, 2016

C program for First Come First Serve Algorithm


Write a C program to perform First Come First Serve Algorithm. Here you will get C program for first come first served (FCFS) scheduling algorithm.


What is First Come First Serve (FCFS) Algorithm?


First Come First Serve (FCFS) is a Non-Preemptive scheduling algorithm. FIFO (First In First Out) strategy assigns priority to process in the order in which they request the processor.

The process that requests the CPU first is allocated the CPU first. This is easily implemented with a FIFO queue for managing the tasks. As the process come in, they are put at the end of the queue. As the CPU finishes each task, it removes it from the start of the queue and heads on to the next task.


ALGORITHM


  1. Start the process
  1. Declare the array size
  1. Get the number of processes to be inserted
  1. Get the value
  1. Start with the first process from it’s initial position let other process to be in queue
  1. Calculate the total number of burst time
  1. Display the values
  1. Stop the process

Below is the source code for C program to perform First Come First Serve Algorithm which is successfully compiled and run on Windows System to produce desired output as shown below :


SOURCE CODE : :



OUTPUT : :


One thought on “Write a C program to perform First Come First Serve Algorithm

  1. Pingback: Write a C program to implement a TIC TAC TOE game

Leave a Reply