Microsoft KB Archive/248685

From BetaArchive Wiki
Knowledge Base


INFO: Running a Thread with a Priority of THREAD_PRIORITY_TIME_CRITICAL

PSS ID Number: 248685

Article Last Modified on 10/27/2003



The information in this article applies to:

  • Microsoft Windows CE Operating System, Versions 2.12
  • Microsoft Windows CE Operating System, Versions 2.11



This article was previously published under Q248685

SUMMARY

Because Windows CE does not support priority classes, the thread priority level alone determines the order in which threads are scheduled. Only when there are no executable threads at a given level will threads at a lower priority be scheduled. A thread with a priority level of THREAD_PRIORITY_TIME_CRITICAL can only be preempted by an Interrupt Service Routine.

When setting thread priorities, you must ensure that high-priority threads are not allowed to consume all of the available CPU time. In particular, you should only use the THREAD_PRIORITY_TIME_CRITICAL priority level on a thread that spends most of its time in a sleep or wait state, waking infrequently to perform a short, time-critical operation.

Keywords: kbinfo KB248685
Technology: kbWinCE211 kbWinCE212 kbWinCESearch