开发者

Implementing Scheduler in free RTos

开发者 https://www.devze.com 2023-04-06 08:03 出处:网络
I need some help. I have a project to build an alternative scheduler for freeRTos, with a different algorithm, and try to replace it in the OS.

I need some help. I have a project to build an alternative scheduler for freeRTos, with a different algorithm, and try to replace it in the OS.

My questions are:

  1. Is it possible in normal time? (for about few months)

  2. How do I rec开发者_运维技巧ognize the code of the scheduler in the whole OS code?


Given that FreeRTOS is only a few thousands lines of code it is certainly possible within a few months. If you know how to write a scheduler, of course.

However, FreeRTOS doesn't even have a real scheduler. It maintains a list of runnable tasks, and at every scheduling point (return from interrupt or explicit yield), it takes the highest priority task from that list.


To add more answers to question 2:

Task controls are in tasks.c, portable/port.c contains context switches.

Have a look at the source organization doc; a given function name gives away which file it's defined it. There really isn't too many places where they can be either. Use grep :)

0

精彩评论

暂无评论...
验证码 换一张
取 消