kohji wrote on Wednesday, March 20, 2019:
kohji wrote on Wednesday, March 20, 2019:
In the case of “configUSE_TIME_SLICING==1”, then Ready state tasks of equal priority will share the available processing time using a time sliced round robin scheduling scheme, acroding to RTOS-task-priority.
I thougt that in the case of “configUSE_TIME_SLICING==0”, fixed scheduling is used. But, the current implementation does not seem to work as expected.
Could you refer to the attached patch?
rtel wrote on Wednesday, March 20, 2019:
What behaviour do you expect and what behaviour do you observe. That
has been discussion on this recently.
kohji wrote on Tuesday, March 26, 2019:
Hi Richard,
I’m sorry for my late response.
I think that expected behaviour in the case of “configUSE_TIME_SLICING=0” is not Round-Robin but FIFO schedulineg, even if plural ready state tasks of equal priority exist. That is, unless the task explicitly blocks(e.g. vTaskDelay()), it does not switch to another task with the same priority as the task. But, when taskSELECT_HIGHEST_PRIORITY_TASK() is called by some interrupt, taskSELECT_HIGHEST_PRIORITY_TASK() returns the next ready state task with the same priority. So, although the task does not block explicityly, it is preempted.
Could you tell me the recent discussion about this?
kohji wrote on Tuesday, March 26, 2019:
Hi Richard,
I’m sorry. I found the bug in the porting layer. I used linux porting shown below.
https://github.com/megakilo/FreeRTOS-Sim
I should fix Source/portable/GCC/POSIX/port.c instead of Source/task.c.
Could you please refer to the attached patch?
And, I tried FreeRTOS with STM32. In this environment, the behavior was exactly what I wanted.
rtel wrote on Tuesday, March 26, 2019:
Thanks for reporting back. The project you linked to is not one of ours
so suggest you submit the patch there too.
kohji wrote on Wednesday, March 27, 2019:
I tried to provide a patch there, but that repository was already read-only, so I couldn’t.
In the following URL, linux simulator for FreeRTOS exists. But, this is not updated. Megakilo’s github is based on this.
Posix/Linux Simulator for FreeRTOS