From the course: Introduction to FreeRTOS and Basic Task Management
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
The concept of a thread
From the course: Introduction to FreeRTOS and Basic Task Management
The concept of a thread
- [Instructor] In this lesson, we are going to talk about threads. In the context of an RTOS, a thread is the smallest unit of execution that the RTOS scheduler manages. You'll often hear threads referred to as tasks. The terms can be used interchangeably, but what exactly does a thread do? A thread represent a sequence of executable instructions that can run concurrently with other threads. Each thread carries out its specific task, sharing resources, such as CPU, memory, IO ports, with other threads. Here we have three threads: Thread 1, Thread 2, and Thread 3. All sharing the same CPU, RAM, and other resources. The RTOS scheduler is responsible for managing which thread gets access to the CPU and other resources at any given moment, ensuring that all threats are given time to execute their instructions. Now let's see the various states of a thread. In simple terms, a thread can exist in three main states. We have the ready state, the run state, and the suspend state. Each of these…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
What is a real-time operating system (RTOS)?3m 18s
-
(Locked)
Importance of RTOS in embedded systems3m 19s
-
(Locked)
The concept of a thread2m 51s
-
(Locked)
Understanding context switching in RTOS2m 24s
-
(Locked)
Introduction to ISR and busy-wait systems2m 6s
-
(Locked)
Comparing RTOS with ISR and busy-wait systems1m 22s
-
-
-
-
-
-