Skip to main content

Task scheduling types and selection factors

Short answer

Task scheduling assigns CPU time to ready tasks. Types include non-preemptive, preemptive (priority, round-robin), and real-time (RMS, EDF). Selection depends on deadlines, CPU utilization, response time, fairness, overhead, and task characteristics.

Define task scheduling, list out its types and explain the factors affecting on selection of scheduling algorithm.

Task scheduling is the activity of the RTOS scheduler that decides which of the ready tasks gets the CPU next and for how long, so that all tasks meet their timing requirements while the CPU is used efficiently.

Types

  1. Non-pre-emptive scheduling: once a task gets the CPU it runs until it finishes or blocks. Examples: FCFS, non-pre-emptive SJF, cooperative scheduling.
  2. Pre-emptive scheduling: the running task can be interrupted when a higher-priority task becomes ready, or when its time slice ends. Examples: pre-emptive priority, round robin, SRTF.
  3. Real-time scheduling: rate monotonic scheduling (RMS, fixed priority by period), earliest deadline first (EDF, dynamic priority).
  4. Static (offline/table-driven) versus dynamic scheduling depending on when decisions are made.

Factors affecting the choice

  • Deadlines and criticality: hard real-time needs RMS/EDF with guaranteed response.
  • CPU utilisation: how fully the CPU is kept busy.
  • Throughput: number of tasks completed per unit time.
  • Turnaround, waiting and response time.
  • Fairness / starvation: no task should wait forever.
  • Scheduling overhead: context-switch cost and the complexity of the algorithm.
  • Task characteristics: periodic or aperiodic, priorities, execution times, I/O or CPU bound.
  • Predictability and simplicity of the algorithm for the application.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Embedded System chapter 6 questions →