COMP3891

Scheduler

Overview

Schedule is responsible for deciding which ready process to run next.

IO Bound + CPU Bound

IO-bound process:

CPU-bound process:

We need a mix of CPU-bound and IO-bound processes to keep both CPU and IO systems busy.

Processes can go from CPU to IO bound (or vice versa) in different phases of execution.

Improving Responsiveness

When Is Scheduling Performed

Goals of Scheduling Algorithms

Round Robin Scheduling

Round Robin scheduling is used in interactive scheduling.

Pros:

Timeslice Considerations

Too short:

Too long:

Priority-Based Scheduling

Unix Scheduler

Two-level scheduler:

Priority Recalculations

Highest priority is scheduled.

Priority = CPU_usage + nice + base (lower is higher priority).

Multiprocessor Scheduling

Single Shared Ready Queue

Pros:

Cons:

Affinity Scheduling

Affinity scheduling tries to run a process on the CPU it ran on last time.

Mutliple Queue SMP Scheduling.

Pros: