"FreeRTOS Real-time Kernel practical Guide" reading notes 1

Source: Internet
Author: User

There is a practical guide to FreeRTOS Real-time kernel zou Changjun yisfx@126.com translation online.

Take a note here:

Chapter One: task management

(1.1) Overview

Each thread of execution is called a "task." Because the author prefers to use [tasks] rather than "threads," the threads have more specific meanings from previous experience.

(1.2) Task function

The task is a dead loop, you can't quit.

(1.3) Top level task status

A task can have one or two states. That is, the running state and the non-running state. The non-operational state can actually be divided into several sub states.

Task moved from non-running state to run state called "Switched in" or "swapped in"

A task is transferred from a running state to a non-running state called "switched out" or "swapped out"

The FreeRTOS Scheduler is the only entity that can make a task cut out.

(1.4) Create a task

Xtaskcreate parameter pcname: A descriptive task name. This parameter is not used by FreeRTOS. Just for auxiliary debugging. It is always easier to identify a readable name than to recognize it by using a handle.

(1.5) Task priority

The scheduler guarantees that the task with the highest priority is always selected and put into the running state in all the tasks that can be run. If there is more than one task on the selected priority, the scheduler will let these tasks take turns.
To be able to select the next running task, the scheduler needs to run itself at the end of each time slice.

The FreeRTOS real-time Kernel practical guide is a great way to get started, and as a beginner, I have to read a few more times and go through the examples.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.