The Labs \ Source Viewer \ SSCLI \ System.Diagnostics \ ProcessPriorityClass

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ProcessPriorityClass.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.Diagnostics
  16. {
  17.    
  18.     using System.Diagnostics;
  19.     /// <devdoc>
  20.     /// A category of priority for a process. Threads within a process
  21.     /// run at a priority which is relative to the process priority class.
  22.     /// </devdoc>
  23.     public enum ProcessPriorityClass
  24.     {
  25.         /// <devdoc>
  26.         /// Specify this class for a process with no special scheduling needs.
  27.         /// </devdoc>
  28.         Normal = 32,
  29.        
  30.         /// <devdoc>
  31.         /// Specify this class for a process whose threads run only when the system is idle.
  32.         /// The threads of the process are preempted by the threads of any process running in
  33.         /// a higher priority class. An example is a screen saver. The idle-priority class is
  34.         /// inherited by child processes.
  35.         /// </devdoc>
  36.         Idle = 64,
  37.        
  38.         /// <devdoc>
  39.         /// Specify this class for a process that performs time-critical tasks that must
  40.         /// be executed immediately. The threads of the process preempt the threads of
  41.         /// normal or idle priority class processes. An example is the Task List, which
  42.         /// must respond quickly when called by the user, regardless of the load on the
  43.         /// operating system. Use extreme care when using the high-priority class, because
  44.         /// a high-priority class application can use nearly all available CPU time.
  45.         /// </devdoc>
  46.         High = 128,
  47.        
  48.         /// <devdoc>
  49.         /// Specify this class for a process that has the highest possible priority.
  50.         /// The threads of the process preempt the threads of all other processes,
  51.         /// including operating system processes performing important tasks. For example,
  52.         /// a real-time process that executes for more than a very brief interval can cause
  53.         /// disk caches not to flush or cause the mouse to be unresponsive.
  54.         /// </devdoc>
  55.         RealTime = 256,
  56.        
  57.         /// <devdoc>
  58.         /// Indicates a process that has priority above Idle but below Normal.
  59.         /// </devdoc>
  60.         BelowNormal = 16384,
  61.        
  62.         /// <devdoc>
  63.         /// Indicates a process that has priority above Normal but below High.
  64.         /// </devdoc>
  65.         AboveNormal = 32768
  66.     }
  67. }

Developer Fusion