Skip navigation

JSI Tip 0269 - Set foreground/backround priority in the Windows NT 4.0 registry.

The relative priority of foreground vs background applications can be set my modifying Win32PrioritySeparation at:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\PriorityControl\Win32PrioritySeparation

This type REG_DWORD entry defaults to 2 if the value is not present.

Win32PrioritySeparation determines how much processor time the threads of a foreground process receive each time they are scheduled on a Windows NT workstation processor.

 Value   Meaning
   0  Short processor interval.  Foreground threads get the same amount
 of processor time as background threads which is the same
 as threads of processes with a priority class of Idle.
   1  Medium length processor interval.  Foreground processes get more
 processor time than background processes each time they are scheduled.      
   2  Long processor interval.  Foreground thread processes get much more
 processor time than background processes.

On a Windows NT 4.0 Server, the length of processor time each thread gets is longer than on a workstation, but it is fixed. The value of Win32PrioritySeparation is used to calculate a priority boost for foreground processes. The higher the value, the greater the boost.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish