1 of 6

Process Scheduling

Algorithms

learnlearn.uk

2 of 6

Round Robin Scheduling

  • Each process is assigned an equal time slot(aka quantum) for execution.
  • Once the quantum time has been reached the process is blocked and will have to wait until the next time round to carry on executing.
  • If a process completes before it reaches it's quantum limit then it self terminates the processor moves onto the next process.

P1

P2

P3

P4

1

2

3

4

1

2

3

4

1

2

3

4

3 of 6

First Come First Served

Jobs are executed in the order they arrive. All processes are guaranteed to be processed, but results in high average waiting times.

1

2

3

4

4 of 6

Shortest Job First

The processes with the shortest total burst time are processed first. As new processes arrive they are compared against existing jobs to see it they have shorter total burst time.

2

2

4

4

1

1

1

3

3

3

3

3

5 of 6

Shortest Remaining Time First

The processes with the shortest burst time remaining are processed first. As new processes arrive they are compared against existing jobs to see which job has the least amount of time remaining.

6 of 6

Process Scheduling Calculations

Turnaround time = Completion Time - Arrival Time

Waiting time = Turnaround time - burst time

Average Waiting Time = Waiting time for all processes / No of processes