X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2F44bsd.texi;h=4d61c17afb995b8daf753c6a57ad42f4d1419bf8;hb=17ecbdac5580a6406b0d6ec84fa17be1f4bb2507;hp=84ddf7f1e0df3036e074aec6c4f832cbf3e98dac;hpb=615bf3b3d2a8573ed6fb9ddc0055745e163ac999;p=pintos-anon diff --git a/doc/44bsd.texi b/doc/44bsd.texi index 84ddf7f..4d61c17 100644 --- a/doc/44bsd.texi +++ b/doc/44bsd.texi @@ -64,13 +64,14 @@ they run in ``round robin'' order. @section Niceness Thread priority is dynamically determined by the scheduler using a -formula given below. However, each thread also has a relatively static -@dfn{nice} value between -20 and 20 that determines how ``nice'' the -thread should be to other threads. A @var{nice} of zero does not affect -thread priority. A positive @var{nice} increases the numeric priority -of a thread, decreasing its effective priority, and causes it to give up -some CPU time it would otherwise receive. On the other hand, a negative -@var{nice} tends to take away CPU time from other threads. +formula given below. However, each thread also has an integer +@dfn{nice} value that determines how ``nice'' the thread should be to +other threads. A @var{nice} of zero does not affect thread priority. A +positive @var{nice}, to the maximum of 20, increases the numeric +priority of a thread, decreasing its effective priority, and causes it +to give up some CPU time it would otherwise receive. On the other hand, +a negative @var{nice}, to the minimum of -20, tends to take away CPU +time from other threads. The initial thread starts with a @var{nice} value of zero. Other threads start with a @var{nice} value inherited from their parent @@ -313,7 +314,7 @@ q}: @tab @code{n * f} @item Convert @code{x} to integer (rounding down): -@tab @code{x * f} +@tab @code{x / f} @item Convert @code{x} to integer (rounding to nearest): @tab @code{(x + f / 2) / f}