implementation of EDF scheduler based on FreeRTOS and testing OS Performance.
Disclaimer : This project is part of "Advanced Embedded Systems" Nanodegree attended at Udacity and FWD program.
⇒ Earliest Deadline First (EDF) is a shecduling algorithm that adopts a dynamic priority-based preemptive scheduling policy, meaning that the priority of a task can change during its execution, and the processing of any task is interrupted by a request for any higher priority task.
⇒ The project aims to design an EDF scheduler based on FreeRTOS.
Disclaimer : The first section in this part of the project is based on the research “Implementation and Test of EDF and LLREFSchedulers in FreeRTOS” published from "Universita degli Studi di Padova" University
⇒ Created 4 tasks to test the OS with the following criteria:
• Task 1: ""Button_1_Monitor"", {Periodicity: 50, Deadline: 50}
This task will monitor rising and falling edge on button 1 and send this event to the consumer task. (Note: The rising and failling edges are treated as separate events, hence they have separate strings)
• Task 2: ""Button_2_Monitor"", {Periodicity: 50, Deadline: 50}
This task will monitor rising and falling edge on button 2 and send this event to the consumer task. (Note: The rising and failling edges are treated as separate events, hence they have separate strings)
• Task 3: ""Periodic_Transmitter"", {Periodicity: 100, Deadline: 100}
This task will send preiodic string every 100ms to the consumer task
• Task 4: ""Uart_Receiver"", {Periodicity: 20, Deadline: 20}
This is the consumer task which will write on UART any received string from other tasks
• 5th and 6th task to simulate a heavier load:
Task 5: ""Load_1_Simulation"", {Periodicity: 10, Deadline: 10}, Execution time: 5ms
Task 6: ""Load_2_Simulation"", {Periodicity: 100, Deadline: 100}, Execution time: 12ms
These two tasks implemented as en empty loop that loops X times to achieve the required execution time mentioned above. (Note: In run-time, used GPIOs and logic analyzer to determine the execution time)
NOTE : Project was implemented on NXP ARM7_LPC2129 Microcontroller and Keil IDE
⇒ Verified system implementation Offline using the following calculations:
• For all the tasks, calculated the execution time from the actual implemented tasks using GPIOs and the logic analyzer
• Calculated the system hyperperiod
• Calculated the CPU load
• Checked the system schedulability using URM and time demand analysis techniques (Assuming the given set of tasks are scheduled using a fixed priority rate -monotonic scheduler)
• Using Simso offline simulator, simulated the given set of tasks
⇒ Verified system implementation in Run-Time using Keil Simulator :
• Calculated the CPU usage time using timer 1 and trace macros
• Using trace macros and GPIOs, ploted the execution of all tasks, tick, and the idle task on the logic analyzer
⇒ Earliest Deadline First (EDF) is a shecduling algorithm that adopts a dynamic priority-based preemptive scheduling policy, meaning that the priority of a task can change during its execution, and the processing of any task is interrupted by a request for any higher priority task.
⇒ The project aims to design an EDF scheduler based on FreeRTOS.
Disclaimer : The first section in this part of the project is based on the research “Implementation and Test of EDF and LLREFSchedulers in FreeRTOS” published from "Universita degli Studi di Padova" University
⇒ Created 4 tasks to test the OS with the following criteria:
• Task 1: ""Button_1_Monitor"", {Periodicity: 50, Deadline: 50}
This task will monitor rising and falling edge on button 1 and send this event to the consumer task. (Note: The rising and failling edges are treated as separate events, hence they have separate strings)
• Task 2: ""Button_2_Monitor"", {Periodicity: 50, Deadline: 50}
This task will monitor rising and falling edge on button 2 and send this event to the consumer task. (Note: The rising and failling edges are treated as separate events, hence they have separate strings)
• Task 3: ""Periodic_Transmitter"", {Periodicity: 100, Deadline: 100}
This task will send preiodic string every 100ms to the consumer task
• Task 4: ""Uart_Receiver"", {Periodicity: 20, Deadline: 20}
This is the consumer task which will write on UART any received string from other tasks
• 5th and 6th task to simulate a heavier load:
Task 5: ""Load_1_Simulation"", {Periodicity: 10, Deadline: 10}, Execution time: 5ms
Task 6: ""Load_2_Simulation"", {Periodicity: 100, Deadline: 100}, Execution time: 12ms
These two tasks implemented as en empty loop that loops X times to achieve the required execution time mentioned above. (Note: In run-time, used GPIOs and logic analyzer to determine the execution time)
NOTE : Project was implemented on NXP ARM7_LPC2129 Microcontroller and Keil IDE
⇒ Verified system implementation Offline using the following calculations:
• For all the tasks, calculated the execution time from the actual implemented tasks using GPIOs and the logic analyzer
• Calculated the system hyperperiod
• Calculated the CPU load
• Checked the system schedulability using URM and time demand analysis techniques (Assuming the given set of tasks are scheduled using a fixed priority rate -monotonic scheduler)
• Using Simso offline simulator, simulated the given set of tasks
⇒ Verified system implementation in Run-Time using Keil Simulator :
• Calculated the CPU usage time using timer 1 and trace macros
• Using trace macros and GPIOs, ploted the execution of all tasks, tick, and the idle task on the logic analyzer