1SCHED_RR_GET_INTERVAL(2)   Linux Programmer's Manual  SCHED_RR_GET_INTERVAL(2)
2
3
4

NAME

6       sched_rr_get_interval - get the SCHED_RR interval for the named process
7

SYNOPSIS

9       #include <sched.h>
10
11       int sched_rr_get_interval(pid_t pid, struct timespec * tp);
12

DESCRIPTION

14       sched_rr_get_interval()  writes  into the timespec structure pointed to
15       by tp the round-robin time quantum for the process identified by pid.
16
17       The timespec structure has the following form:
18
19           struct timespec {
20               time_t tv_sec;    /* seconds */
21               long   tv_nsec;   /* nanoseconds */
22           };
23
24       If pid is zero, the time quantum for the  calling  process  is  written
25       into  *tp.  The identified process should be running under the SCHED_RR
26       scheduling policy.  POSIX systems on which  sched_rr_get_interval()  is
27       available define _POSIX_PRIORITY_SCHEDULING in <unistd.h>.
28

RETURN VALUE

30       On  success,  sched_rr_get_interval()  returns  0.   On  error,  -1  is
31       returned, and errno is set appropriately.
32

ERRORS

34       EFAULT Problem with copying information to userspace.
35
36       EINVAL Invalid pid.
37
38       ENOSYS The system call is not yet implemented (only on rather old  ker‐
39              nels).
40
41       ESRCH  The process whose ID is pid could not be found.
42

CONFORMING TO

44       POSIX.1-2001.
45

NOTES

47   Linux Notes
48       POSIX  does  not  specify any mechanism for controlling the size of the
49       round-robin time quantum.  However,  Linux  provides  a  (non-portable)
50       method  of  doing this.  The quantum can be controlled by adjusting the
51       process's nice value (see setpriority(2)).  Assigning a negative (i.e.,
52       high)  nice  value  results  in  a longer quantum; assigning a positive
53       (i.e., low) nice value results in a shorter quantum.  The default quan‐
54       tum is 0.1 seconds; the degree to which changing the nice value affects
55       the quantum has varied somewhat across kernel versions.
56

SEE ALSO

58       sched_setscheduler(2) has a description of the Linux scheduling scheme.
59
60       Programming for the real  world  -  POSIX.4  by  Bill  O.  Gallmeister,
61       O'Reilly & Associates, Inc., ISBN 1-56592-074-0
62

COLOPHON

64       This  page  is  part of release 3.22 of the Linux man-pages project.  A
65       description of the project, and information about reporting  bugs,  can
66       be found at http://www.kernel.org/doc/man-pages/.
67
68
69
70Linux                             2007-04-06          SCHED_RR_GET_INTERVAL(2)
Impressum