Content-type: text/html
Man page of classcntl
classcntl
Section: System Calls (2)
Index
Return to Main Contents
NAME
classcntl - manage kernel class scheduling properties.
SYNOPSIS
#include <sys/types.h>
#include <sys/class.h>
int classcntl(
int opcode,
int arg1,
int arg2,
int arg3
);
PARAMETERS
Identifies the type of operation (see below).
These are
opcode
dependent and are
described below.
DESCRIPTION
The
classcntl
function is used to control kernel class scheduler functions.
Opcode and Argument Descriptions
Informs the kernel that class scheduling is turned on. The
kernel will look for threads being class scheduled and charge time used against
the class. Once class scheduling has been enabled, it is necessary to tell
the kernel which class members to begin charging via the
CL_OP_ADD_TO_CLASS
opcode.
-
There are no arguments.
Turn off class scheduling. All class members are reset to
their original state. If the kernel has been notified, via
CL_OP_DAEMON_ALIVE, that a class scheduler daemon has been started, that daemon will
be terminated.
-
There are no arguments.
Gets the
class_list
array from the kernel.
The
class_list
array is a list of MAX_NUM_CLASSES integers.
-
Arguments:
User buffer into which the kernel data is copied.
Number of bytes to copy.
Unused.
Identify class members to the kernel so that their CPU usage
is charged to their class.
-
Arguments:
Class type, as in CL_TYPE_& (see class.h).
Numeric value for member (gid, uid, session id, pgrp id, or
pid).
Index into the class_list array that represents the class.
Notify the kernel that a class member's CPU time is not to
be charged.
-
Arguments:
Type as in CL_TYPE_& (see class.h).
Numeric value for member (gid, uid, session id, pgrp id, or
pid).
Unused.
Sets the
class_list
array into the kernel.
The
class_list
array is a list of MAX_NUM_CLASSES integers.
-
Arguments:
User buffer into which is copied into the kernel.
Number of bytes to copy.
idle_enforce -- when set to 0, a class is allowed to
exceed its CPU percentage if the system would be otherwise idle. Else, a
class is forced to its CPU percentage even if the system has no other work.
Informs the kernel that a class_scheduler daemon is running
and how often it checks class CPU usage. Should the daemon fail to run in
twice the interval specified, the kernel will disable class scheduling.
-
Arguments:
The pid of the daemon.
The interval, in seconds.
Unused.
Returns 1 if class scheduling is currently enabled, 0 otherwise.
-
There are no arguments.
Get the class index of a specified process id (pid).
-
Arguments:
Pid of the target process.
Address of the user data (integer) to receive the class index.
Unused.
RESTRICTIONS
The caller must have root access rights.
RETURN VALUES
Unless otherwise noted above, the
classcntl
returns
a value of zero (0) on success. The
classcntl
function returns
-1
upon failure and
sets
errno
to indicate the error.
ERRORS
The
classcntl
function fails under the following
conditions:
The Caller does not have super user privileges.
Access denied -- class scheduling not enabled.
SEE ALSO
class_scheduling(4),
runclass(1),
class_admin(8)
Index
- NAME
-
- SYNOPSIS
-
- PARAMETERS
-
- DESCRIPTION
-
- RESTRICTIONS
-
- RETURN VALUES
-
- ERRORS
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 02:40:15 GMT, October 02, 2010