What's New in Processes and Threads
Windows 7 and Windows Server 2008 R2 include the following new programming elements for processes and threads.
New Capabilities
The 64-bit versions of Windows 7 and Windows Server 2008 R2 support more than 64 logical processors on a single computer. For more information, see Processor Groups.
User-mode scheduling (UMS) is a lightweight mechanism that applications can use to schedule their own threads. For more information, see User-Mode Scheduling.
New Functions
The following new functions are used with processors and processor groups.
| Function | Description |
|---|---|
|
Creates a thread that runs in the virtual address space of another process and optionally specifies extended attributes such as processor group affinity. | |
|
Returns the number of active processors in a processor group or in the system. | |
|
Returns the number of active processor groups in the system. | |
|
Retrieves the processor group and number of the logical processor in which the calling thread is running. | |
|
Retrieves information about the relationships of logical processors and related hardware. | |
|
Returns the maximum number of logical processors that a processor group or the system can have. | |
|
Returns the maximum number of processor groups that the system can have. | |
|
Retrieves the amount of memory that is available in the specified node as a USHORT value. | |
|
Retrieves the NUMA node associated with the underlying device for a file handle. | |
|
Retrieves the processor mask for the specified NUMA node as a USHORT value. | |
|
Retrieves the node number of the specified logical processor as a USHORT value. | |
|
Retrieves the node number as a USHORT value for the specified proximity identifier. | |
|
Retrieves the processor group affinity of the specified process. | |
|
Retrieves the cycle time each processor in the specified group spent executing deferred procedure calls (DPCs) and interrupt service routines (ISRs). | |
|
Retrieves the processor group affinity of the specified thread. | |
|
Retrieves the processor number of the ideal processor for the specified thread. | |
|
Retrieves the accumulated cycle time for the idle thread on each logical processor in the specified processor group. | |
|
Sets the processor group affinity for the specified thread. | |
|
Sets the ideal processor for the specified thread and optionally retrieves the previous ideal processor. |
The following new functions are used with thread pools.
| Function | Description |
|---|---|
|
Retrieves the stack reserve and commit sizes for threads in the specified thread pool. | |
|
Specifies that the callback should run on a persistent thread. | |
|
Specifies the priority of a callback function relative to other work items in the same thread pool. | |
|
Sets the stack reserve and commit sizes for new threads in the specified thread pool. |
The following new functions are used with UMS.
| Function | Description |
|---|---|
|
Creates a UMS completion list. | |
|
Creates a UMS thread context to represent a UMS worker thread. | |
|
Deletes the specified UMS completion list. The list must be empty. | |
|
Deletes the specified UMS thread context. The thread must be terminated. | |
|
Retrieves UMS worker threads from the specified UMS completion list. | |
|
Converts the calling thread into a UMS scheduler thread. | |
|
Runs the specified UMS worker thread. | |
|
Returns the UMS thread context of the calling UMS thread. | |
|
Returns the next UMS thread context in a list of UMS thread contexts. | |
|
Retrieves a handle to the event associated with the specified UMS completion list. | |
|
Retrieves information about the specified UMS worker thread. | |
|
Sets application-specific context information for the specified UMS worker thread. | |
|
The application-defined UMS scheduler entry point function associated with a UMS completion list. | |
|
Yields control to the UMS scheduler thread on which the calling UMS worker thread is running. |
New Structures
| Structure | Description |
|---|---|
|
Describes cache attributes. | |
|
Contains a processor group-specific affinity, such as the affinity of a thread. | |
|
Contains information about processor groups. | |
|
Contains information about a NUMA node in a processor group. | |
|
Contains the number and affinity of processors in a processor group. | |
|
Represents a logical processor in a processor group. | |
|
Contains information about affinity within a processor group. | |
|
Contains information about the relationships of logical processors and related hardware. | |
|
Specifies attributes for a UMS worker thread. | |
|
Specifies attributes for a UMS scheduler thread |