First Come First Serve or Non-pre-emptive Scheduling.
The CPU can run processes in the process queue (in ready state) one at a time for a “burst” at a time in a first come first serve fashion. This is known as non pre-emptive scheduling, since no determination is made into the most efficient order to run processes on the CPU.
It should be noted that the amount of time that a process might stay on the CPU could be very long when compared to others in the queue. This is because a “burst” might a sequence of CPU and IO instructions the process executes without interruption form the CPU scheduling algorithm . The process is only moved from execution on the CPU when a I/O operation occurs that causes the process to be put in wait mode, or, it terminates.
Having other processes wait exceedingly long is not desirable, and todays modern operating systems do not implement FCFS.
FCFS scheduling does have the advantage of being easier to program and implement; but this advantage does not outweigh the performance of an efficient process scheduler.
FCFS scheduling is also prone to race conditions, where 2 processes need to read from the same section in memory and end up producing inconsistent data. See here for a good explanation:
https://stackoverflow.com/questions/3130079/difference-between-racearound-condition-and-deadlock
Shortest Job First or Pre-Emptive scheduling
This scheduling algorithm examines each process to determine the length of time that is needed for on the CPU. The algorithm then places processes with the shortest estimated time to be executed as priority.
Round Robin Scheduling
This is very similar to FCFS scheduling , only this time each process is given a fixed maximum time to be executed on the CPU. If the process exceeds the time, it is put in wait mode and added to the end of the queue.
© 2021 Vedesh Kungebeharry. All rights reserved.