1 / 6

Demo - Cooperative Scheduler

Demo - Cooperative Scheduler. Thomas Patten Advanced Embedded Systems Monday, September 27, 2004. Scheduler Operation. Initialize Scheduler Clear the Memory Set up the Timer Initialize the task Add tasks to scheduler Done using an Array of Structures Start the Scheduler

yestin
Download Presentation

Demo - Cooperative Scheduler

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Demo - Cooperative Scheduler Thomas Patten Advanced Embedded Systems Monday, September 27, 2004

  2. Scheduler Operation • Initialize Scheduler • Clear the Memory • Set up the Timer • Initialize the task • Add tasks to scheduler • Done using an Array of Structures • Start the Scheduler • Run the Dispatcher • Check to see if any tasks need to be run • Update on Timer Overflow • Return to Dispatcher

  3. struct name { type name; type name; } variable; struct stuff { char c; int n; }mystuff, hisstuff; hisstuff.c = ‘Y’; hisstuff.n = 199; Structures

  4. Task Overlap • SCH_Add_Task(TaskA, 0, 1000) • SCH_Add_Task(TaskB, 0, 3000) • Every 3 seconds, the tasks will run at the same time, this is fixed using offsets • SCH_Add_Task(TaskA, 0, 1000) • SCH_Add_Task(TaskB, 5, 3000)

  5. Tick Interval/Task Duration • All tasks should have a duration less than the tick interval! • Task Timeout should be used to prevent blocking the scheduler • Tick Interval should be set to the Greatest Common Factor for precise scheduling • Total time required to execute all scheduled tasks must be less than the processor time

  6. Questions, Comments or Words of Wisdom?

More Related