Export (0) Print
Expand All
Expand Minimize

Thread Object

Updated: March 28, 2003

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

The Thread performance object consists of counters that measure aspects of thread behavior. A thread is the basic object that executes instructions on a processor. All running processes have at least one thread.

 

Counter Name Description Counter Type

% Privileged Time

Shows the percentage of non-idle processor time spent executing code in privileged mode. Privileged mode is a processing mode designed for operating system components and hardware-manipulating drivers. It allows direct access to hardware and memory. The alternative, user mode, is a restricted processing mode designed for applications, environmental subsystems, and integral subsystems. The operating system switches application threads to privileged mode to access operating system services.

% Privileged Time includes time servicing interrupts and DPCs. A high rate of privileged time might be attributed to a large number of interrupts generated by a failing device. When a Windows system service is called, the service often runs in privileged mode to gain access to system-private data. Such data is protected from access by threads executing in user mode. Calls to the system can be explicit or implicit, such as page faults or interrupts.

Unlike some earlier Windows operating systems, Windows 2000 and the Windows Server 2003 family use process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. These subsystem processes provide additional protection. Therefore, some work done by Windows 2000 and Windows Server 2003 on behalf of your application might appear in other subsystem processes in addition to the privileged time in your process.

PERF_100NSEC_TIMER

% Processor Time

Shows the percentage of time that the processor spent executing a non-idle thread. It is calculated by measuring the duration that the idle thread is active during the sample interval, and subtracting that time from 100 %. (Each processor has an idle thread that consumes cycles when no other threads are ready to run.) This counter is the primary indicator of processor activity, and displays the average percentage of busy time observed during the sample interval. Code executed to handle some hardware interrupts and trap conditions are included in this count.

PERF_100NSEC_TIMER

% User Time

Shows the percentage of time that the processor spent executing code in user mode. Applications, environment subsystems, and integral subsystems execute in user mode. Code executing in user mode cannot damage the integrity of the Windows Executive, kernel, and/or device drivers. Unlike some earlier Windows operating systems, Windows 2000 and Windows Server 2003 use process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. These subsystem processes provide additional protection. Therefore, some work done by Windows 2000 and Windows Server 2003 on behalf of your application might appear in other subsystem processes in addition to the privileged time in your process.

PERF_100NSEC_TIMER

Context Switches/sec

Shows the combined rate, in incidents per second, at which all processors on the computer were switched from one thread to another Context switches occur when a running thread voluntarily relinquishes the processor, or is preempted by a higher priority, ready thread.

PERF_COUNTER_COUNTER

Elapsed Time

Shows the time, in seconds, that this process has been running.

PERF_ELAPSED_TIME

ID Process

Shows the unique identifier of this process. ID Process numbers are reused, so they only identify a process for the lifetime of that process.

PERF_COUNTER_RAWCOUNT

ID Thread

Shows the unique identifier of this thread. ID Thread numbers are reused, so they only identify a thread for the lifetime of that thread.

PERF_COUNTER_RAWCOUNT

Priority Base

Shows the current base priority of this process. Threads within a process can raise and lower their own base priority relative to the process's base priority.

PERF_COUNTER_RAWCOUNT

Priority Current

Shows the current dynamic priority of this thread. The system can raise the dynamic priority of the thread above the base priority if the thread is handling user input, or lower it toward the base priority if the thread becomes compute bound.

PERF_COUNTER_RAWCOUNT

Start Address

Shows the starting virtual address for this thread.

PERF_COUNTER_RAWCOUNT

Thread State

Shows the current state of the thread. Valid values are: 0 Initialized 1 Ready 2 Running 3 Standby 4 Terminated 5 Waiting 6 Transition 7 Unknown

PERF_COUNTER_RAWCOUNT

Thread Wait Reason

Shows the reason that a thread was in the Wait state. This counter is only applicable when the thread is in the Wait state, which is indicated by a Thread State value of 5. Values for this counter are as follows: 0 Waiting for a component of the Windows NT Executive 1 Waiting for a page to be freed 2 Waiting for a page to be mapped or copied 3 Waiting for space to be allocated in the paged or nonpaged pool 4 Waiting for an Execution Delay to be resolved 5 Suspended 6 Waiting for a user request 7 Waiting for a component of the Windows NT Executive 8 Waiting for a page to be freed 9 Waiting for a page to be mapped or copied 10 Waiting for space to be allocated in the paged or nonpaged pool 11 Waiting for an Execution Delay to be resolved 12 Suspended 13 Waiting for a user request 14 Waiting for an event pair high 15 Waiting for an event pair low 16 Waiting for an LPC Receive notice 17 Waiting for an LPC Reply notice 18 Waiting for virtual memory to be allocated 19 Waiting for a page to be written to disk 20+ (Reserved for future use)

PERF_COUNTER_RAWCOUNT

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft