90 likes | 310 Views
Advanced Embedded Systems Design. Lecture 4 Time and Event Triggered Scheduling BAE 5030 - 003 Fall 2004 Instructor: Marvin Stone Biosystems and Agricultural Engineering Oklahoma State University. Goals for Class Today. Questions over reading Pre-emptive scheduler (Roshani Jayasekara)
E N D
Advanced Embedded Systems Design Lecture 4 Time and Event Triggered Scheduling BAE 5030 - 003 Fall 2004 Instructor: Marvin Stone Biosystems and Agricultural Engineering Oklahoma State University
Goals for Class Today • Questions over reading • Pre-emptive scheduler (Roshani Jayasekara) • Time triggered tasking and use of hardware delay • Keil Compiler • Profiling • Set assignment
Co-operative schedulers • Time based dispatching of task(s) • Hardware timer used to generate timed interrupts • Timed interrupts may be tick or counted for tick • Task’s structure contains timing information • Phase or initial delay • Period • Tasks are checked each tick for run status • Tick is atom of time • Developer responsible for rationality of task timing • Task overlap must be eliminated • Total task time must be < total processor time • Desirable to have task execution times less than tick interval • Tasks must not block scheduler
Cooperative scheduler sequences • Desirable scheduling • Problem Overlapping tasks!
Pont’s cooperative scheduler • Pont’s method • Timer overflow ISR used update run status of tasks • Checks tasks to determine if they should be run • Increments their flag if they should be run (RunMe) • Main continuously checks tasks to determine if they should be run • Runs task if RunMe > 0 • Decrements RunMe • Removes task if it is a one-shot
Demo – Cooperative Scheduler – LED Flasher • Review • Task structure • Start • Add_Task • Update • Dispatcher • Review profiler results • Discuss • Task overlap • Tick interval / Task duration • Task timeout
Assignment • Recode the time tasking example to: • 1) Print “Hello World” as the task • 2) Lengthen the task period to 10 ms. • Read Pont, Chapters 15,16 • Tutorial – 30 min • Explain a pre-emptive two three task scheduler