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 !!
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.
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.
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.
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