Quality RTOS & Embedded Software

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


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 ]    [ 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