Platform SDK: DLLs, Processes, and Threads |
The scheduler maintains a queue of executable threads for each priority level. These are known as ready threads. When a processor becomes available, the system performs a context switch. The steps in a context switch are:
The following classes of threads are not ready threads.
Until threads that are suspended or blocked become ready to run, the scheduler does not allocate any processor time to them, regardless of their priority.
The most common reasons for a context switch are:
When a running thread needs to wait, it relinquishes the remainder of its time slice.