Scheduling Doubts

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

Scheduling Doubts

http://www.freertos.org/a00014.html#Features

Scheduling Doubts

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. Regards, Joerg

Scheduling Doubts

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.

Scheduling Doubts

You could have the high priority task temporarily raise the priority of the low priority task dynamically.

Scheduling Doubts

Ok now this, We are using the lwip demo for arm7. In the vBasicwebserver task (highest priority) it calls for vTaskDelay(webSHORTdelay). So after this the lowertasks (led blinks) get processor time. But if we comment the vTaskDelay(webSHORTdelay) line. the leds still get processor time. How is this working?

Scheduling Doubts

it must block elsewhere in the task also.

Scheduling Doubts

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);

Scheduling Doubts

Taking a quick look I see vBasicWebServer calls netconn_accept which calls sys_mbox_fetch which blocks.