[−][src]Enum dpdk_unix::scheduling::Scheduler
A Linux scheduler.
Variants
Idle
For running very low priority background jobs.
Lower priority than Idle
.
The process' nice
value is ignored.
This policy is intended for running jobs at extremely low priority (lower even than a +1
9 nice value with the Other
or Batch
policies).
Batch(Nice)
For 'batch' style execution of processes.
Slightly lower priority than Other
, higher than Idle
.
Since Linux 2.6.16.
This policy is similar to Other
in that it schedules the process according to its dynamic priority (based on the nice value).
The difference is that this policy will cause the scheduler to always assume that the process is CPU-intensive.
Consequently, the scheduler will apply a small scheduling penalty with respect to wakeup behaviour, so that this process is mildly disfavored in scheduling decisions.
This policy is useful for workloads that are noninteractive, but do not want to lower their nice value, and for workloads that want a deterministic scheduling policy without interactivity causing extra preemptions (between the workload's tasks).
Other(Nice)
The standard (and default) round-robin time-sharing scheduler.
The process to run is chosen from the static priority 0 list based on a dynamic priority that is determined only inside this list.
The dynamic priority is based on the nice value (set by setpriority()
) and increased for each time quantum the process is ready to run, but denied to run by the scheduler.
This ensures fair progress among all Other
processes.
RealTimeFirstInFirstOut(RealTimeSchedulerPriority)
A first-in, first-out real time scheduler.
When a RealTimeFirstInFirstOut
processes becomes runnable, it will always immediately preempt any currently running Other
, Batch
or Idle
process.
A RealTimeFirstInFirstOut
process that has been preempted by another process of higher priority will stay at the head of the list for its priority and will resume execution as soon as all processes of higher priority are blocked again.
When a RealTimeFirstInFirstOut
process becomes runnable, it will be inserted at the end of the list for its priority.
A RealTimeFirstInFirstOut
process runs until either it is blocked by an I/O request, it is preempted by a higher priority process, or it calls sched_yield()
.
RealTimeRoundRobin(RealTimeSchedulerPriority)
A round-robin real time scheduler.
Everything described above for RealTimeFirstInFirstOut
also applies to RealTimeRoundRobin
, except that each process is only allowed to run for a maximum time quantum.
If a RealTimeRoundRobin
process has been running for a time period equal to or longer than the time quantum, it will be put at the end of the list for its priority.
A RealTimeRoundRobin
process that has been preempted by a higher priority process and subsequently resumes execution as a running process will complete the unexpired portion of its round-robin time quantum.
The length of the time quantum can be retrieved using sched_rr_get_interval()
.
Deadline
A real time scheduler that takes precedence over all other schedulers.
Also known as "Earliest-Deadline-First" (EDF).
Since Linux 3.14.
Using a Deadline scheduler is impossible if a thread has an affinity to less than the total CPUs on the system (or in the current cgroup).
Fields of Deadline
Methods
impl Scheduler
[src]
pub fn set_for_current_thread(&self) -> Result<(), &'static str>
[src]
Returns an error if permission was denied or a deadline scheduler could not be brought into use.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,