.\" Copyright (c) 1980 Regents of the University of California. .\" All rights reserved. The Berkeley software License Agreement .\" specifies the terms and conditions for redistribution. .\" .\" @(#)nice.3c 6.1 (Berkeley) 5/9/85 .\" .TH NICE 2 "May 9, 1985" .UC 4 .SH NAME nice \- set program priority .SH SYNOPSIS .nf .ft B #include int nice(int \fIincr\fP) .ft R .fi .SH DESCRIPTION The scheduling priority of the process is augmented by .IR incr . Positive priorities get less service than normal. Priority 10 is recommended to users who wish to execute long-running programs without flak from the administration. .PP Negative increments are ignored except on behalf of the super-user. The priority is limited to the range \-20 (most urgent) to 20 (least). .PP The priority of a process is passed to a child process by .BR fork (2). For a privileged process to return to normal priority from an unknown state, .B nice should be called successively with arguments \-40 (goes to priority \-20 because of truncation), 20 (to get to 0). .PP If a CPU-bound process at nice level 0 gets one tick from the scheduler, then a CPU-bound process at nice level .I n is entitled to 2\ **\ (\-\fIn\fP\ /\ 2) ticks, which boils down to 1/32 ticks at nice level 10, and 1/1024 ticks at nice level 20. Compared to other systems the effect of the Minix nice is quite strong. .SH "SEE ALSO" .BR nice (1).