FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [June 2009 Threads] Pre-emptive scheduling issuePosted 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 issuePosted 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 issuePosted 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 issuePosted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|