ok that much is understood abt scheduling what is given in the forum "scheduling question" and source code. The comments in the source code are very helpful.
But now the question is: If 2 or more processes are running ( each of same priority), how much time does each process get?? It is in a Round Robin fashion. So it has to split the Tick interrupt timing and giv a time slice to each task, 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.)?? Pls verify this doubt.
Thank you.
Roy
Hi,
in preemptive mode FreeRTOS always runs the highest available task until it blocks.
So if you got a high priority task wich does not call TaskDelay() or the like in regular, it might happen that lower priority tasks starve.
I wonder if its possible to guarantee lower priority tasks to get called from time to time even when there is a higher one active.
I wonder how other OSs handle this (Linux) and if its
feasible for low RAM low MIPS controllers.
This is how all systems of this type work. You decide which tasks should run by choosing their priority. If you want a low priority task to run even when a high priority task is able to run then you have your priorities set incorrectly.
Well I’ve been trough the code and am prety sure
that it doesn’t get blocked. At least not in
place where I would expect it.
But isn’t it true that, if the source of the task reaches a point that ther is nothing to be done at that point while(1); it gives the processor to the idle taks. or the task to be scheduled from the que?
It is definitely true that the task with the higest priority takes the processor and won’t give it up even when it stuck in a while(1);