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

Pre-emptive scheduling issue

Posted by Chandra V on June 19, 2009
Dear All

I am getting round robin scheduling ( equal time slice between tasks ) behavior even though i have configured to
Preemptive scheduling mechanism. I tried to explain my sample application below.

Microcontroller : NEC V850
Tick rate : 8ms
configUSE_PREEMPTION : 1

Sample Application : 1
Two tasks were created with priority 1 and 2. In each task,seperate test pin (I/O pin configured as Output) is toggled continuesly for DSO measurement.
I expected that highest priority task always executes continously without allowing low priority task. But it executes by round robin scheduling manner.

Now i have changed both tasks priority to 1. Still it executes by round robin scheduling manner irrespective of priority changes.

Is my expectation correct?

If anything is wrong then please reply!

Regards

RE: Pre-emptive scheduling issue

Posted by Richard Damon on June 19, 2009
Does the higher priority task wait for anything? (Like a call to vTaskDelay?) If so, when it does so it tells the kernel it doesn't need the processor at the moment and it gives time to the lower priority task.


RE: Pre-emptive scheduling issue

Posted by Chandra V on June 22, 2009
Hi

Thanks for your feedback.

I didn't use delay routine. I am new to freeRTOS usage. So i want to test pre-emptive schedular feature between tasks and also round robin scheduler feature.

As per my understanding, Low priority will not get chance to get execute if higher task is executing without any possibilities of block/suspend state. Thats what i expected in sample application.

Regards

RE: Pre-emptive scheduling issue

Posted by incrediball on June 22, 2009
Your assumption is correct. The low priority task will not run as long as the high priority task is not suspended. It can be suspended by a delay command, when taking a semaphore, waiting for queued data, etc.


[ 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