Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

Processing time between tasks with the same priority

Posted by orifai01 on May 9, 2017

Hi, I wonder how the scheduler decides between two tasks with the same priority, when configUSEPREEMPTION equals to 1 and configUSETIME_SLICING equals to 0 (i.e. a context switch should not occur on a tick interrupt). Thank you in advanced.


Processing time between tasks with the same priority

Posted by rtel on May 9, 2017

...the same way it does when configUSE_PREEMPTION is 1, it will always choose the task of that priority that has been waiting the longest.


Processing time between tasks with the same priority

Posted by rtel on May 9, 2017

Sorry, I meant the same way it does when configUSETIMESLICING is 1.


Processing time between tasks with the same priority

Posted by heinbali01 on May 9, 2017

And so :

the [way the] scheduler decides between two tasks with the same priority

is

...the same way it does when configUSETIMESLICING is 1, it will always choose the task of that priority that has been waiting the longest.

FreeRTOS has a principle of "fairness":

● The runnable task with the highest priority will be selected ● If the are more runnable tasks with the highest priority, the one which is waiting the longest will go first

( where "runnable" means "ready to run", enlisted in the pxReadyTasksLists[] )

As you probably know, configUSE_TIME_SLICING needs configUSE_PREEMPTION to be effective.

With time-slicing enabled, the clock-tick will force a task-switch, in case there are more runnable tasks of the same priority. Without time-slicing enabled, a task must yield explicitly in order to switch to the next same priority-task.


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists