Algorithm:

  • Processes are added to a queue in order of arrival
  • Picks the first process in the queue and executes it
  • If the process needs more time to complete it is placed at the end of the queue Details:
  • Simple to implement
  • However, average waiting time can be quite high

Abstract

Given the following table: Calculate the:

  • Completion Time
  • Turn Around Time
  • Waiting Time

Example

First we can work through and create a relative time graph: At:

  • t=0 The only ready process is P2, so we run P2 until completion
  • t=1 P2 is now finished, but nothing else is ready
  • t=2 P1 and P3 have now arrived, P1 will get priority here just by the way we have defined them. P1 runs until completion
  • t=4 P1 is now finished, in the mean time P4 has arrived, but P3 takes priority and is run until completion
  • t=7 P3 is now finished, we can run P4 until completion
  • t=12 P4 is now finished From this we can extend our table as such: