41081 Chapter Notes - Chapter 8: Windows Task Scheduler
Chapter 8 - Task Scheduler
Converting different period tasks to C
• Different period tasks can be converted to C via a method that uses new variables
for counting timer ticks.
• The timer period can be set to some small value, and then the appropriate number
of tier tiks a e outed to deterie whether to all a task’s tik futio.
• The timer period must evenly divide all tasks periods.
Creating a tasks structure in C
• A struct is a C construct that allows several variables to be grouped together under a
single name. It is defined as follows:
• Typedef defines a new data type and variables can be defined as being of the new
type.
• The fields of the struct can be read using dot notation
Code for a simpler cooperative task scheduler
• By expressing the task structure as a for loop, it can be scaled easily for more tasks.
This loops is known as a task scheduler.
• A tasks scheduler determines when each tasks should be executed in a multiple-task
system.
• RIM has a function named sleep() which puts the processor into a low power mode
whilst not executing any tasks.
find more resources at oneclass.com
find more resources at oneclass.com
Document Summary
Creating a tasks structure in c: a struct is a c construct that allows several variables to be grouped together under a single name. It is defined as follows: typedef defines a new data type and variables can be defined as being of the new type, the fields of the struct can be read using dot notation. Code for a simpler cooperative task scheduler: by expressing the task structure as a for loop, it can be scaled easily for more tasks.