72    3.  ++-   

//Linux

[tdhughes@colony]$ ps Tux

USER	PID	%CPU	%	VSZ	RSS	TTY
tdhughes	19259	0,	.0	0,	.1	2448	1356	pts/4
tdhughes	19334	0,	.0	0.	.0	1732	860	pts/4
tdhughes	19336	0,	.0	0.	.0	1928	780	pts/4
tdhughes	19337	18,	.0	2.	.4	26872	24856	pts/4
tdhughes	19338	18.	.0	2.	.3	26872	24696	pts/4
tdhughes	19341	17.	.9	2.	.3	26872	24556	pts/4
tdhughes	19400	0,	.0	0.	.0	2544	692	pts/4
tdhughes	19401	0.	.0	0.	.1	2448	1356	pts/4

STAT	START	TIME
S	20	29	0	00
S	20	33	0	00
S	20	33	0	00
R	20	33	0	47
R	20	33	0	47
R	20	33	0	47
R	20	38	0	00
R	20	38	0	00

COMMAND

-bash

/home/tdhughes/pv
/home/1 dhughe s/pv
/home/tdhughes/pv
/home/tdhughes/pv
/home/tdhughes/pv
ps Tux

-bash

. 3.8.    ps Tux   Linux



^include <unistd.h>
int nice(int incr);

   ,     . 
incr  ,      
.   incr     ,
      . 
 incr   ,  ,   -
.   incr   ,   -
  .   incr    
    ,     
     .   
 nice ()     ,   -
   -1,         .



#include <sys/resource-h>
int getpriority(int which,
int setpriority(int which,

id_t who) ;

id_t who, int value) ;

 setpriority ()      -
,    .  getpriority() 
  ,    .  -
  setpriority ()  getpriority ()    -
        3.1.

//  3.1.
//

  setpriority()
getpriority()

#include <sys/resource.h>

//. . .
id_t pid = 0;

int which = PRIO_PROCESS ;

int value = 10;

int nice_value;

int ret;

nice_value = getpriority(which,pid);