EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1373 background imageLoading...
Page #1373 background image
Chapter 4. API Guides
--------------------------------------------------------------------------------
1. Starting state. None of the ready state tasks have been selected to run
Head [ AX , B0 , C1 , D0 ] Tail
--------------------------------------------------------------------------------
2. Core 0 has tick interrupt and searches for a task to run.
Task A is selected and is moved to the back of the list
Core0--|
Head [ AX , B0 , C1 , D0 ] Tail
0
Head [ B0 , C1 , D0 , AX ] Tail
--------------------------------------------------------------------------------
3. Core 1 has a tick interrupt and searches for a task to run.
Task B cannot be run due to incompatible affinity, so core 1 skips to Task C.
Task C is selected and is moved to the back of the list
Core1-------| 0
Head [ B0 , C1 , D0 , AX ] Tail
0 1
Head [ B0 , D0 , AX , C1 ] Tail
--------------------------------------------------------------------------------
4. Core 0 has another tick interrupt and searches for a task to run.
Task B is selected and moved to the back of the list
Core0--| 1
Head [ B0 , D0 , AX , C1 ] Tail
1 0
Head [ D0 , AX , C1 , B0 ] Tail
--------------------------------------------------------------------------------
5. Core 1 has another tick and searches for a task to run.
Task D cannot be run due to incompatible affinity, so core 1 skips to Task A
Task A is selected and moved to the back of the list
Core1-------| 0
Head [ D0 , AX , C1 , B0 ] Tail
0 1
Head [ D0 , C1 , B0 , AX ] Tail
The implications to users regarding the Best Effort Round Robin time slicing:
Users cannot expect multiple ready state tasks of the same priority to run sequentially (as is the case in Vanilla
FreeRTOS). As demonstrated in the example above, a core may need to skip over tasks.
However, given enough ticks, a task will eventually be given some processing time.
If a core cannot find a task runnable task at the highest ready state priority, it will drop to a lower priority to
search for tasks.
To achieve ideal round robin time slicing, users should ensure that all tasks of a particular priority are pinned
to the same core.
Espressif Systems 1362
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish