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] [March 2006 Threads] Scheduling DoubtsPosted by Roy on March 12, 2006 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
RE: Scheduling DoubtsPosted by Nobody/Anonymous on March 13, 2006 http://www.freertos.org/a00014.html#Features
RE: Scheduling DoubtsPosted by Jörg Krein on March 13, 2006 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
RE: Scheduling DoubtsPosted by Nobody/Anonymous on March 13, 2006 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.
RE: Scheduling DoubtsPosted by Nobody/Anonymous on March 13, 2006 You could have the high priority task temporarily raise the priority of the low priority task dynamically.
RE: Scheduling DoubtsPosted by Eddie on March 14, 2006 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?
RE: Scheduling DoubtsPosted by Nobody/Anonymous on March 14, 2006 it must block elsewhere in the task also.
RE: Scheduling DoubtsPosted by Eddie on March 14, 2006 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);
RE: Scheduling DoubtsPosted by Nobody/Anonymous on March 14, 2006 Taking a quick look I see vBasicWebServer calls netconn_accept which calls sys_mbox_fetch which blocks.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|