Scheduling Algorithms with Example

Scheduling algorithms example
Share This Post

 First Come First Serve Algorithm

  • In this algorithm, jobs are executed on the basis of first come and first out.
  • It is easy to understand and implement
  • It’s not having high performance and having high waiting time.

Example

Shortest Job First (SJF)

  • Shortest job first algorithm is further having two categories i.e. Preemptive and Non-Preemptive.
  • Preemptive SJF in this algorithm when the processes come to queue it will sort it and while executing any process if any new process comes with the less burst time from the remaining time of the currently executing process then it will preempt.

Example

Non-Preemptive SJF

  • In this algorithm, the job given to the CPU will not preempt until it completes.
  • It will select the job with the minimum execution time first.

Example

 

Priority Scheduling 

  • In this algorithm, priority is assigned for each particular process and the job with the highest priority will be processed first.

Example

Round Robin Scheduling

  • In this scheduling technique, each process is provided with the fixed time to execute i.e. also called quantum.
  • When one process executes for the given time then the process is preempted and other process executed for the same given time period.

 

Share

Leave a Reply

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