Share via


Thread Scheduling Timers (Windows Embedded CE 6.0)

1/5/2010

The kernel's thread scheduling algorithm is closely related to power management as most devices are very sensitive to power consumption. The kernel calls OEMIdle whenever no threads are ready to run. The job of OEMIdle is to put the CPU into a low-power state until one of the following events occurs:

  • An interrupt wakes the system.
  • A thread is ready to be scheduled.

In practice, many devices spend most of their time waiting for input from the user. As a result, they will spend a great deal of time in OEMIdle.

When the system is not idle, threads are using the CPU to do work and OEMIdle is not called. Instead, a thread timer goes off periodically to update the system time and invoke the kernel's scheduler. When thread context switches occur, the timer interrupts the currently running thread, the thread context is saved, and another thread's context is restored when the timer ISR returns.

See Also

Concepts

Kernel Scheduler