CPU Scheduling Algorithms | FCFS | Principles of Operating Systems

CPU SCHEDULING ALGORITHMS

CPU scheduling deals with the problem of deciding which of the processes in the Ready queue is to be allocated the CPU. Various CPU scheduling algorithms are:

  • FCFS (First Come First Serve) Scheduling
  • SJF (Shortest Job First) Scheduling
  • Priority Scheduling
  • RR (Round Robin) Scheduling
  • Multilevel Queue Scheduling
  1. FCFS(First Come First Serve)

With this scheme, the process that requests the CPU first is allocated the CPU first. The implementation is easily managed with FIFO (First In First Out) queue. Queue stores all the processes that want to be executed. When a process enters the ready queue, its PCB (Process Control Block) is linked onto the tail of the queue. When the CPU is free, it is allocated to the process at the head of the queue. The running process is then removed from the queue.

FCFS OBSERVATIONS

FCFS scheduling is the simplest scheduling algorithm, but it can cause short processes waiting time to be very HIGH.

The average waiting time under the FCFS policy is often quite long. The average waiting time under a FCFS policy is generally not minimal and may vary substantially if the process CPU-burst times vary greatly.

FCFS scheduling algorithm is non-pre-emptive. This means once the CPU has been allocated to a process, that process keeps the CPU until it finishes its execution. So, FCFS is not good for time-sharing systems, where each user needs to get a share of the CPU at regular intervals.

CONVOY EFFECT: All the short processes wait for the big process to get off the CPU. This results in lower CPU utilization. This is known as convoy effect.

 

Gopal Krishna

Hey Engineers, welcome to the award-winning blog,Engineers Tutor. I'm Gopal Krishna. a professional engineer & blogger from Andhra Pradesh, India. Notes and Video Materials for Engineering in Electronics, Communications and Computer Science subjects are added. "A blog to support Electronics, Electrical communication and computer students".

Leave a Reply

Your email address will not be published. Required fields are marked *

Translate »