1 #ifndef _UAPI_LINUX_SCHED_TYPES_H
2 #define _UAPI_LINUX_SCHED_TYPES_H
4 #include <linux/types.h>
10 #define SCHED_ATTR_SIZE_VER0 48 /* sizeof first published struct */
13 * Extended scheduling parameters data structure.
15 * This is needed because the original struct sched_param can not be
16 * altered without introducing ABI issues with legacy applications
17 * (e.g., in sched_getparam()).
19 * However, the possibility of specifying more than just a priority for
20 * the tasks may be useful for a wide variety of application fields, e.g.,
21 * multimedia, streaming, automation and control, and many others.
23 * This variant (sched_attr) is meant at describing a so-called
24 * sporadic time-constrained task. In such model a task is specified by:
25 * - the activation period or minimum instance inter-arrival time;
26 * - the maximum (or average, depending on the actual scheduling
27 * discipline) computation time of all instances, a.k.a. runtime;
28 * - the deadline (relative to the actual activation time) of each
30 * Very briefly, a periodic (sporadic) task asks for the execution of
31 * some specific computation --which is typically called an instance--
32 * (at most) every period. Moreover, each instance typically lasts no more
33 * than the runtime and must be completed by time instant t equal to
34 * the instance activation time + the deadline.
36 * This is reflected by the actual fields of the sched_attr structure:
38 * @size size of the structure, for fwd/bwd compat.
40 * @sched_policy task's scheduling policy
41 * @sched_flags for customizing the scheduler behaviour
42 * @sched_nice task's nice value (SCHED_NORMAL/BATCH)
43 * @sched_priority task's static priority (SCHED_FIFO/RR)
44 * @sched_deadline representative of the task's deadline
45 * @sched_runtime representative of the task's runtime
46 * @sched_period representative of the task's period
48 * Given this task model, there are a multiplicity of scheduling algorithms
49 * and policies, that can be used to ensure all the tasks will make their
52 * As of now, the SCHED_DEADLINE policy (sched_dl scheduling class) is the
53 * only user of this new interface. More information about the algorithm
54 * available in the scheduling class file or in Documentation/.
62 /* SCHED_NORMAL, SCHED_BATCH */
65 /* SCHED_FIFO, SCHED_RR */
74 #endif /* _UAPI_LINUX_SCHED_TYPES_H */