Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

Scheduling Doubts

Posted 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 Doubts

Posted by Nobody/Anonymous on March 13, 2006
http://www.freertos.org/a00014.html#Features

RE: Scheduling Doubts

Posted 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 Doubts

Posted 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 Doubts

Posted 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 Doubts

Posted 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 Doubts

Posted by Nobody/Anonymous on March 14, 2006
it must block elsewhere in the task also.

RE: Scheduling Doubts

Posted 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 Doubts

Posted by Nobody/Anonymous on March 14, 2006
Taking a quick look I see vBasicWebServer calls netconn_accept which calls sys_mbox_fetch which blocks.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS