Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Scheduling question

Posted by Nobody/Anonymous on January 9, 2006
Hi,

First of all, you did a great job with FreeRTOS. I have a question about priorities. For example, if i'm running 3 tasks (T1, T2, T3). The priority
of T1= 2 and the priority for T2 = 1 and T3 = 1. Can you explain me how the scheduler will execute the code in time ? Does T1 will execute 2 times or
will execute longer ?

T1 -> T2 -> T1 -> T3

or

T1 -> T1 -> T2 -> T3

or ...

I Hope my example is clear. Thank you for your help !!

RE: Scheduling question

Posted by Richard on January 9, 2006
Assuming you are using the preemptive scheduler:

T1 is the highest priority task. Any time T1 is not blocked it will execute.

T2 and T3 have the same priority, but a priority less than T1. T2 and T3 will only execute if T1 is blocked. When T1 is blocked T2 and T3 will take it in turns to execute.


Regards.

RE: Scheduling question

Posted by Nobody/Anonymous on January 11, 2006
the higher priority task takes cpu time until it needs it,after releasing execution other tasks can be runned!

RE: Scheduling question

Posted by Nobody/Anonymous on January 11, 2006
Richard,
What do you mean by "blocked"

Thanks

RE: Scheduling question

Posted by Nobody/Anonymous on January 11, 2006
?
Unable to run.

If it calls vTaskDelay(), vTaskDelayUntil() then it will block until the correct time to unblock.

If it calls xQueueReceive() it can specify a block time. A time it wants to wait for data if data is not already available.

RE: Scheduling question

Posted by Nobody/Anonymous on January 11, 2006
Is it possible that a task can't block ?

RE: Scheduling question

Posted by Nobody/Anonymous on January 11, 2006
A task will block if you tell it to. If you don't, it wont.

A task can also exist in a ready state - in this case it is ready to run (not blocked) but not running because a task of higher or equal priority is running.

I think maybe you could do with some background reading. Start with www.freertos.org/implementation.

RE: Scheduling question

Posted by Nobody/Anonymous on January 11, 2006
The idle task cannot block - at least your stuffed if it does. You should know these things before using FreeRTOS. Are you a student?

RE: Scheduling question

Posted by Nobody/Anonymous on March 12, 2006
ok that much is understood. But now the question is: If 2 or more processes are running ( each of same priority), how much time does each process get?? Is it in a Round Robin fashion? If so it has to split the Tick interrupt timing, right? I understood it as that at each Tick the scheduler check for higher prioroty task. So do the tasks here run for one whole tick?? Where is this code specified (file name,line no.)??
Thank you.

RE: Scheduling question

Posted by Roy on March 12, 2006
Previous posting by me itself.
ok that much is understood. But now the question is: If 2 or more processes are running ( each of same priority), how much time does each process get?? Is it in a Round Robin fashion? If so it has to split the Tick interrupt timing, right? I understood it as that at each Tick the scheduler check for higher prioroty task. So do the tasks here run for one whole tick?? Where is this code specified (file name,line no.)??
Thank you.
Roy

RE: Scheduling question

Posted by Nobody/Anonymous on March 13, 2006
Yes there is round robin amonst tasks of the same priority.

Read the documentation.

Read the source code.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner