EVOLUTION-MANAGER
Edit File: psnice.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Get or Set the Priority (Niceness) of a Process</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for psnice {tools}"><tr><td>psnice {tools}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Get or Set the Priority (Niceness) of a Process</h2> <h3>Description</h3> <p>Get or set the ‘niceness’ of the current process, or one or more other processes. </p> <h3>Usage</h3> <pre> psnice(pid = Sys.getpid(), value = NA_integer_) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>pid</code></td> <td> <p>positive integers: the process IDs of one of more processes: defaults to the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session process.</p> </td></tr> <tr valign="top"><td><code>value</code></td> <td> <p>The niceness to be set, or <code>NA</code> for an enquiry.</p> </td></tr> </table> <h3>Details</h3> <p>POSIX operating systems have a concept of process priorities, usually from 0 to 39 (or 40) with 20 being a normal priority and (somewhat confusingly) larger numeric values denoting lower priority. To add to the confusion, there is a ‘niceness’ value, the amount by which the priority numerically exceeds 20 (which can be negative). Processes with high niceness will receive less CPU time than those with normal priority. On some OSes, processes with niceness <code>+19</code> are only run when the system would otherwise be idle. </p> <p>On many OSes utilities such as <code>top</code> report the priority and not the niceness. Niceness is used by the utility ‘<span class="file">/usr/bin/renice</span>’: ‘<span class="file">/usr/bin/nice</span>’ (and <code>/usr/bin/renice -n</code>) specifies an <em>increment</em> in niceness. </p> <p>Only privileged users (usually super-users) can lower the niceness. </p> <p>Windows has a slightly different concept of ‘priority classes’. We have mapped the idle priority to niceness <code>19</code>, ‘below normal’ to <code>15</code>, normal to <code>0</code>, ‘above normal’ to <code>-5</code> and ‘realtime’ to <code>-10</code>. Unlike Unix-alikes, a non-privileged user can increase the priority class on Windows (but using ‘realtime’ is inadvisable). </p> <h3>Value</h3> <p>An integer vector of <em>previous</em> niceness values, <code>NA</code> if unknown for any reason. </p> <h3>See Also</h3> <p>Various functions in package <span class="pkg">parallel</span> create child processes whose priority may need to be changed. </p> <p><code><a href="pskill.html">pskill</a></code>. </p> <hr /><div style="text-align: center;">[Package <em>tools</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>