Any tips for optimizing Round-Robin scheduling in FreeRTOS for real-time applications?

Hey guys, please I need your help here . I'm working on a home automation system using FreeRTOS and experimenting with Round-Robin scheduling for fair task execution. I'm facing issues with critical tasks like sensor data processing and actuator control getting delayed, affecting system responsiveness. I've tried adjusting priorities and time quantum, but the performance isn't as expected. Any tips for optimizing Round-Robin scheduling in FreeRTOS for real-time applications, or suggestions for alternative algorithms that might work better?
Solution:
cool. I think you should assume all the tasks to be periodic and come up the CPU utilisation factor. If that is within 70%, the tasks can be scheduled and no deadline will be missed. If u see that the utilisation is more than 70%, then u need a CPU thats faster or u need to optimise the code to be faster.
Jump to solution
7 Replies
Joseph Ogbonna
Joseph Ogbonna•4mo ago
Consider using a different scheduling algorithm like Earliest Deadline First (EDF) or Rate Monotonic (RM) for better real-time performance in your home automation system. These algorithms are often more suitable for meeting timing requirements compared to Round-Robin scheduling in FreeRTOS.
streetdogg
streetdogg•4mo ago
are these periodic tasks?
Marvee Amasi
Marvee Amasi•4mo ago
Hmm, EDF 🤔 thanks @Joseph Ogbonna
Marvee Amasi
Marvee Amasi•4mo ago
Yes, some of the tasks are periodic, such as sensor data sampling and actuator control updates. However, I'm also dealing with non-periodic tasks like user interface responsiveness and event handling.
Solution
streetdogg
streetdogg•4mo ago
cool. I think you should assume all the tasks to be periodic and come up the CPU utilisation factor. If that is within 70%, the tasks can be scheduled and no deadline will be missed. If u see that the utilisation is more than 70%, then u need a CPU thats faster or u need to optimise the code to be faster.
Marvee Amasi
Marvee Amasi•4mo ago
Nice thanks
Want results from more Discord servers?
Add your server
More Posts
System-on-Modules Speed IIoT App Developmenthttps://www.electronicdesign.com/technologies/embedded/article/21283959/electronic-design-system-on-How Microchips WorkDiscover the essence of microchip design in this concise yet comprehensive article. From basic princRISC and CISC: Understanding the Differences and Their Impact on Computer ArchitectureThe history of computer architecture has been marked by two distinct design philosophies - Reduced IIntegrating ESP32 onto a PCBDoes anyone have schematics and pcb layout of an ESP32 integrated onto a PCB? I am looking to createIoT Solution Reliability Checklist: Ensuring High Availability and Seamless Connectivity! 📱💡✅ Endpoint High Availability: Ensure that the IoT platform endpoint is highly available for uninterrlearning and working with esp32I am currently learning and working bluetooth ble and wifi by using do it esp32 devkit v1 and esp32 Best practices for selecting an MCU for a battery-powered IoT deviceWhat are some guidelines we need to follow when selecting a microcontroller for an IoT device that rHow do I choose an MCU for a battery-powered system design?What are some guidelines we need to follow when selecting a microcontroller for an IoT device that rI don't know why my BJT circuit is not workingHello.. I want to ask a question!.. I am learning about bjt.. so while practicing it circuit on breaShould I use the ESP Framework or Arduino IDE for Commercial Product Development?@Umesh Lokhande Is it okay to use Arduino framework for real iot products or should we use esp frame