6.7. Thread Priorities

Windows 2000 uses a round-robin priority queue structure to schedule CPU time among available threads. In order to understand both thread priorities and how to set them, you need to be familiar with the priority and scheduling mechanisms used by Windows 2000. This section contains a brief overview.

All of the threads in a process have a priority relative to their parent process. The priority of the threads determines the amount of CPU time they receive relative to one another and relative to other threads in other processes. You set a thread's priority using the SetThreadPriority function and retrieve it using the GetThreadPriority function.

GetThreadPriorityRetrieves the priority of a thread
 int GetThreadPriority( HANDLE ...

Get Win32 System Services: The Heart of Windows® 98 and Windows® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.