| I can only answer for the VMS DECwindows server scheduler's algorithm.
Each connection is assigned a priority in the range of 0 to 15, where
0 is the highest priority. The default priority of a connection is
15. A connection is raised to a higher priority depending upon certain
events (detailed below). Priority 0 is special, and is reserved for
a connection that is grabbing the server.
The server scheduler picks the connection with the highest priority
and runs it. If it runs out of requests, the server picks the next
highest priority connection. The server scheduler also assigns a
quantum of time to the connection. If the connection uses up its
quantum, then the connection's priority is lowered by 1 until it
reaches the base. Connections at the same priority are scheduled
in round-robin fashion.
The server scheduler changes the priority of a connection to the
following values based on the following events:
1 new connection
2 abort connection
10 mouse motion event
11 key press/release event
12 button press/release event
13 window expose/resize event
14 new input (requests)
15 default
In summary, a connection's priority is raised if something significant
happens to it, and its priority falls if it keeps on processing but no
new events happen to it. The end result is that interactive connections
tend to get priority over compute-bound connections. Note that this
algorithm is subject to change (but I don't expect it will).
To answer your question, connections can affect their priority only
indirectly. They cannot set any particular priority.
|