next up previous contents index
Next: Virtual Memory Up: Running Ultrix Applications on Previous: Running Ultrix Applications on

Scheduling

      The component of Taos responsible for processor scheduling is called the Nub. The Nub assigns threads to processors via a preemptive priority scheme with time-slicing and optional constraints on which processors can run which threads. There are three priority levels (normal, foreground, and background) available to user programs. There is no automatic adjustment of priorities.

  The getpriority kernel call maps from Topaz to Ultrix priorities as follows: background becomes +10, normal becomes 0, and foreground becomes -10. If getpriority is applied to a process containing several threads, it returns the highest priority (lowest numerical value) of any thread.

  The setpriority kernel call maps from Ultrix to Topaz priorities as follows: positive values become background, 0 becomes normal, and negative values become foreground. If setpriority is applied to a process containing several threads, it sets the priority of each of them to the same value. This is usually not a good idea.

Neither getpriority nor setpriority ever returns EACCES.



Paul McJones
8/28/1997