#define SCHED_RR 0b001 #define SCHED_COOP 0b010 #define SCHED_INTR 0b100 int manage_tcluster(int cluster, int flags, int quantum, int percentage);
This syscall sets settings for the passed cluster
. Flags is a bitmap of:
SCHED_RR
: Use a prioritized round robin as scheduling algorithm for
threads inside the cluster. The quantum for niceness 0 will be quantum
.
For more information on how quantums are used to calculate execution times,
check Thread clustering management.
SCHED_COOP
: Use cooperative scheduling as algorithm for the threads of
the cluster, which will just pass execution on interruptions (if enabled),
manual execution yielding, or end of the cluster’s percentage. This flag
conflicts with SCHED_RR
. quantum
is ignored for this algorithm.
SCHED_INTR
: If set, the cluster will be interruptible, that means, it
can have its threads rescheduled on IO events, or other situations deemed
worthy by the kernel.
Quantum is the quantum for the algorithm chosen, in nanoseconds. Percentage is a 0 to 100 integer for the percentage of execution the cluster is given.
The syscall returns 0
on success and -1
on failure, with the
following errno:
EACCES
: MAC did not allow the operation.
EINVAL
: One of the passed values was not correct.