Skip to main content

Chapter 6 · Watch, then practise

RTOS

Reason about task readiness and resource ownership so urgent work can run without wasting CPU time on waiting.

3 questions · 3 with related videos. Matches are based on playlist titles; broader background matches are labeled.

What to study

  • Ready, running and blocked tasks
  • Priority scheduling
  • Mutex ownership
  • Priority inversion and inheritance

Chapter playlists

Choose a playlist

Notes

Introduction to RTOS Part 3 - Task Scheduling | Digi-Key Electronics

DigiKey · 10:59

The supplementary RTOS scheduling lesson matches ready, running and blocked task behavior.

1. Task states

How does a blocked task differ from a ready task?

A ready task can run but is waiting for processor time. A blocked task waits for an event or timeout, such as incoming queue data. Blocking on that event lets other tasks execute; repeatedly checking it in a tight loop consumes CPU time.

L-2.8: Pre-emptive Priority Scheduling Algorithm with Example | Operating System

Gate Smashers · 10:30

The chapter preemptive-priority scheduling lesson matches the higher-priority ready-task scenario.

2. Priorities

Under fixed-priority preemptive scheduling, what runs when a higher-priority task becomes ready?

The higher-priority ready task preempts a lower-priority task. Priority alone does not guarantee deadlines: execution time, blocking and interrupt work must fit the timing requirements. A high-priority task that never blocks can prevent lower-priority tasks from progressing.

Introduction to RTOS Part 11 - Priority Inversion | Digi-Key Electronics

DigiKey · 12:35

The supplementary priority-inversion lesson matches the blocking problem addressed by priority inheritance.

3. Priority inheritance

What problem can mutex priority inheritance reduce?

A high-priority task may wait for a mutex owned by a low-priority task while medium-priority work delays the owner. Inheritance temporarily raises the owner’s priority so it can release the resource. FreeRTOS uses a simplified mechanism; it does not eliminate every possible deadlock or timing problem.

References