Export (0) Print
Expand All
Expand Minimize

ProcessPriorityClass Enumeration

Indicates the priority that the system associates with a process. This value, together with the priority value of each thread of the process, determines each thread's base priority level.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)

public enum ProcessPriorityClass

Member nameDescription
AboveNormalSpecifies that the process has priority above Normal but below High.
BelowNormalSpecifies that the process has priority above Idle but below Normal.
HighSpecifies that the process performs time-critical tasks that must be executed immediately, such as the Task List dialog, which must respond quickly when called by the user, regardless of the load on the operating system. The threads of the process preempt the threads of normal or idle priority class processes.
Caution noteCaution

Use extreme care when specifying High for the process's priority class, because a high priority class application can use nearly all available processor time.

IdleSpecifies that the threads of this process run only when the system is idle, such as a screen saver. The threads of the process are preempted by the threads of any process running in a higher priority class.
NoteNote

The idle priority class is inherited by child processes.

NormalSpecifies that the process has no special scheduling needs.
RealTimeSpecifies that the process has the highest possible priority.
Caution noteCaution

The threads of a process with RealTime priority preempt the threads of all other processes, including operating system processes performing important tasks. Thus, a RealTime priority process that executes for more than a very brief interval can cause disk caches not to flush or cause the mouse to be unresponsive.

A process priority class encompasses a range of thread priority levels. Threads with different priorities running in the process run relative to the process's priority class. The operating system uses the base-priority level of all executable threads to determine which thread gets the next slice of processor time.

Win32 uses four priority classes with seven base priority levels per class. Based on time elapsed or other boosts, the operating system can change the base priority level when a process needs to be put ahead of others for access to the processor. In addition, you can set PriorityBoostEnabled to temporarily boost the priority level of threads that have been taken out of the wait state. The priority is reset when the process returns to the wait state.

Windows 98 Platform Note: Setting the priority class to AboveNormal or BelowNormal causes an exception to be thrown.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft