---
title: "Task scheduling types and selection factors"
subject: "Embedded System"
chapter: 6
key: "semester_6/embedded_system:task-scheduling-types-factors"
source: https://www.bctengineer.com/q/semester_6/embedded_system/task-scheduling-types-factors
site: BCT Engineering
---

# Task scheduling types and selection factors

Embedded System · Chapter 6: RTOS

- Asked in: 2075 Baisakh, 4 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/embedded_system/task-scheduling-types-factors
- Whole chapter: https://www.bctengineer.com/md/semester_6/embedded_system/chapter-6

## Question

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

## 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.

## Answer

**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.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. In non-pre-emptive scheduling a running task:
   A. Is interrupted by any arriving task
   B. Always gets a time slice
   C. Runs until it finishes or blocks
   D. Is moved at every tick
   Answer: C. FCFS and cooperative scheduling are non-pre-emptive. (Key point: Non-pre-emptive)

2. Which are real-time scheduling algorithms?
   A. FCFS and SJF
   B. Rate monotonic (RMS) and earliest deadline first (EDF)
   C. Round robin and FIFO
   D. Bubble sort and RMS
   Answer: B. RMS uses fixed priorities by period and EDF uses dynamic priorities by deadline. (Key point: Real-time algorithms)

3. What is needed when deadlines are hard?
   A. Algorithms with guaranteed response such as RMS or EDF
   B. Any fair algorithm
   C. Maximum throughput only
   D. Non-pre-emptive FCFS
   Answer: A. Deadlines and criticality drive the choice. (Key point: Hard real-time factor)

4. What does the fairness factor ensure?
   A. All tasks have equal priority
   B. Tasks never block
   C. All tasks finish together
   D. No task waits forever
   Answer: D. Starvation avoidance is a criterion in selecting an algorithm. (Key point: Starvation)

## Related in Embedded System

- [Preemptive priority scheduling (4, 6, 5 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-4-6-5) — Embedded System, chapter 6
- [Round robin scheduling (9, 6, 3 ms, q=2)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-rr-9-6-3-q2) — Embedded System, chapter 6, asked 4×
- [Round robin scheduling (9, 6, 3 ms, q=3)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-rr-9-6-3-q3) — Embedded System, chapter 6, asked 4×
- [Round robin scheduling (6, 4, 2 ms, q=2)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-rr-6-4-2-q2) — Embedded System, chapter 6, asked 4×
- [Round robin scheduling (53, 17, 68, 24 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-rr-53-17-68-24-q4) — Embedded System, chapter 6, asked 4×

## Related in other subjects

- [Factors affecting selection of pile type](https://www.bctengineer.com/question.md?key=semester_5%2Ffoundation_engineering%3Apile-type-selection-factors) — Foundation Engineering, chapter 8
- [Foundation selection factors, excavation in wet areas](https://www.bctengineer.com/question.md?key=semester_6%2Fbuilding_technology%3Aexcavation-selection-wet-080c) — Building Technology, chapter 2
- [Rainfall-runoff relationship, factors affecting runoff](https://www.bctengineer.com/question.md?key=semester_5%2Fengineering_hydrology%3Arainfall-runoff-relation-factors) — Engineering Hydrology, chapter 4
- [Factors affecting water demand; variation](https://www.bctengineer.com/question.md?key=semester_5%2Fwater_supply_engineering%3Afactors-affecting-demand) — Water Supply Engineering, chapter 3, asked 5×
