ipcSetPriority
ipcSetPriority(x_priorityChange) =>t
Description
Sets the priority value for child processes. All processes spawned after this call run at the priority offset to x_priorityChange.
Typically, a batch process is run with a low priority. Interactive processes run under normal priority settings. The ipcSetPriority function lets you lower priorities more readily than raise them. Some increase is permitted but even the lowest value given to x_priorityChange increases the priority from the norm by little.
The x_priorityChange value is not the absolute priority value that will be used to set the scheduling priority of a process. A value of priority change will be derived from the value given to x_priorityChange. For example, a child process invoked with the default priority value of 15 will be running at the UNIX OS nice value of 30 (assume the invoking process that calls ipcBeginProcess to spawn the child process is running at the default UNIX OS nice value of 20 and the range of nice values imposed by an UNIX system is 0/40).
Processes with super-user privileges can spawn child processes with nice values lower than the default UNIX OS nice value (thus, raise the scheduling priority) by giving to x_priorityChange the range of priority values 0,1,2,3,...9, which maps to the ranges of UNIX OS nice values 0,2,4,6,...18, respectively (assume that the default UNIX OS nice value is 20).
For non-super-user processes, the range of priority values can be given to x_priorityChange is 10,11,12,13,...20, which maps to the ranges of UNIX OS nice values 20,22,24,26,...40 (or 39 because a nice value of 40 is treated as 39 by OS), respectively. The range of priority values 0-9 given to x_priorityChange for non-super-user processes will not lower the UNIX OS nice value further from the default UNIX OS nice value (that is, the lowest value can be given to x_priorityChange by non-super-user processes is 10, which maps to the default UNIX OS nice value; typically 20).
Arguments
Value Returned
|
Always returns |
Examples
ipcGetPriority() ; Default priority
15
ipcSetPriority(10)
t
ipcGetPriority()
10
ipcSetPriority(21) ; Priority out of range
*Error* ipcSetPriority: priority value must be in the range 0-20 - 21
Related Topics
Interprocess Communication Functions
Return to top