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] [January 2006 Threads] Scheduling questionPosted 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 questionPosted 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 questionPosted 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 questionPosted by Nobody/Anonymous on January 11, 2006 Richard, What do you mean by "blocked"
Thanks
RE: Scheduling questionPosted 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 questionPosted by Nobody/Anonymous on January 11, 2006 Is it possible that a task can't block ?
RE: Scheduling questionPosted 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 questionPosted 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 questionPosted 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 questionPosted 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 questionPosted 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|