operating-systems scheduling

Definition

Scheduling

Scheduling determines the order in which processes execute on the processor, optimising system performance according to various criteria.

Objectives

Throughput

Maximising processes completed per unit of time.

Processor Utilisation

Keeping the CPU as busy as possible.

Fairness

Every process receives reasonable CPU time without starvation.

Response Time

Minimising time between user request and first response (critical for interactive systems).

Turnaround Time

Minimising total time from submission to completion.

Deadlines

Critical tasks complete within specified constraints. See Real-Time Scheduling.

Strategy Components

Selection Function

Logic to choose the next process from the Ready Queue (based on priority, execution time, or wait time).

Decision Mode

When the selection function is invoked:

  • Non-preemptive: Process runs until it terminates or blocks itself
  • Preemptive: OS can interrupt a running process (clock interrupt, higher-priority process ready)

Activation

Scheduler Triggers

The short-term scheduler (dispatcher) activates on: