| |||
| Home > IEM Software Overview > IEM system operation > Running the fast event handlers | |||
The fast event handlers are run from the kernel hooks whenever a system event occurs (see Handling system events).
For each policy, the IEM kernel determines whether its fast event handler recognizes the system event. If so, the IEM kernel runs the fast event handler, passing it pointers to the IEM kernel data structures (see IEM kernel data structures) that include:
the system event structure describing the event
the IEM block describing the task that triggered the system event.
The fast event handler then processes the event. Typical uses of the fast event handler include:
Recognizing a task that requires an immediate change in performance level, and requesting that performance level. The fast event handler might recognize:
a specific task, such as a movie player
a type of task, such as real-time tasks, or tasks that are receiving user input.
If necessary, the fast event handler can get further information about the task by making calls to the OS layer API.
Storing policy-specific information about the current state of the task or the system, for later processing by the standard event handler of the same policy.
The fast event handler might get this information by making calls to the IEM HAL or OS layer APIs. It typically stores this information in arrays of memory that are allocated by the initialization function of the policy.
When the fast event handlers have been run, the IEM kernel then combines any performance requests that the fast event handlers are making, and sets the resulting performance level using the IEM HAL.